php - Upload file from url to AWS in laravel -


i know how upload file local storage aws using laravel. want upload file directly external url aws without downloading.

any suggestion, how can achieve this.

i solved 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 image library can found here in "integration in laravel" section.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -