First, you are sourcing a string (public), not the file..try Storage::disk('s3')->put($destinationPath.$filename, $file);
Dec 2, 2015
3
Level 1
saving image to amazon s3 results in 6 bytes file
im sending uploads from my drop zone to s3 bucket, below is my function
public function addPhoto($id, Request $request) {
$file = $request->file('file');
$destinationPath = '/files/';
$code = new Uuid(time().'_');
$ext = '.' . $file->getClientOriginalExtension();
$filename = $code . $ext;
$s3 = \Storage::disk('s3')->put($destinationPath.$filename, 'public');
$machine = Machine::findOrFail($id);
$machine->photos()->create(['path' => $destinationPath.$filename]);
return 'Done';
}
i can see the file gets uploaded to s3 bucket but its only 6 bytes.
Level 1
Please or to participate in this conversation.