kayintveen's avatar

Laravel 5 s3 uploading 115b image files

Hi all,

I've been experimenting with S3. But so far no good.

the following im trying to do

$filename       =   $image->filename;
$targetPath     =   public_path().$user->fileLocation;
Storage::disk('s3')->put($user->fileLocation.$filename,Storage::get($targetPath.$filename));

i also tried it without the storage::get

Storage::disk('s3')->put($user->fileLocation.$filename,$targetPath.$filename);

so to be exact the target path points to the local file /var/www/vhosts/... and so on. and the fileLocation points to the folder it has to get.

0 likes
4 replies
kayintveen's avatar

Thank you for your reply, to be honest this is the first time working with s3. you have any example how you might do this?

kayintveen's avatar

By the way @martinbean One way i use it, its indeed user uploaded. but i also tried is as queue where he picks up the file already uploaded on our servers and passes it on to S3.

Please or to participate in this conversation.