I have a Laravel 5.6 project which has images stored using the Storage facade.
I am trying to take an image that I have stored and move it to S3 storage like this..
$contents = Storage::disk('local')->url($image->filename);
$storagePath = Storage::disk('s3')->put("uploads", $contents, 'public');
This uploads a file to the S3 bucket called 'uploads' that contains the path to the file like this...
/storage/myimage.jpg
How can I upload the actual file instead of saving the path?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KtPb9t
via IFTTT
Aucun commentaire:
Enregistrer un commentaire