What's the best way to copy an uploaded file from my Laravel installation (running on Heroku) to S3? I can't do a direct to S3 upload, as it's an image that I'm locally generating a thumbnail for. I also don't want to use any extra libraries etc. (sledgehammer to crack a nut etc.). File needs to go in a particular folder in my S3 bucket. Is this the only/best way? :-
Storage::disk('s3')->put('S3_folder_name/file.jpg', file_get_contents('my_local_file.jpg'));
Thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2keN3WL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire