I know how to upload file from local storage to aws using laravel. But I want to upload file directly from external url to aws without downloading.
Any suggestion, how can I achieve this.
I know how to upload file from local storage to aws using laravel. But I want to upload file directly from external url to aws without downloading.
Any suggestion, how can I achieve this.
I finally solved this using Intervention Image Library.
use Image;
use Storage;
$image = Image::make('url');
$image->encode('jpg');
$s3 = Storage::disk('s3');
$filePath = '/profilePhotos/'.$time();
$s3->put($filePath, $image->__toString(), 'public');
Installation instructions for Image library can be found here in the "Integration in Laravel" section.