質問編集履歴

1

ソースコードの更新

2020/04/14 14:05

投稿

helloo
helloo

スコア11

test CHANGED
File without changes
test CHANGED
@@ -164,7 +164,7 @@
164
164
 
165
165
  $attachment_data = [
166
166
 
167
- 'path' => Storage::disk('s3'),
167
+ 'path' => $path,
168
168
 
169
169
  'name' => $filename
170
170
 
@@ -196,50 +196,6 @@
196
196
 
197
197
  }
198
198
 
199
-
200
-
201
- public function upload(Request $request)
202
-
203
- {
204
-
205
- $this->validate($request, [
206
-
207
- 'file' => [
208
-
209
- 'required',
210
-
211
- 'file',
212
-
213
- 'image',
214
-
215
- 'mimes:jpeg,png',
216
-
217
- ]
218
-
219
- ]);
220
-
221
-
222
-
223
- if ($request->file('images')->isValid([])) {
224
-
225
- $path = Storage::disk('s3')->putFile('/',$form,'public');
226
-
227
- return view('stories.index2')->with('filename', basename($path));
228
-
229
- } else {
230
-
231
- return redirect('/')
232
-
233
- ->back()
234
-
235
- ->withInput()
236
-
237
- ->withErrors();
238
-
239
- }
240
-
241
- }
242
-
243
199
  }
244
200
 
245
201