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
Post a Comment