Answers for "upload file local to s3 laravel"

PHP
0

download data from s3 and save to local disk laravel

$s3_file = Storage::disk('s3')->get(request()->file);
 $s3 = Storage::disk('public');
 $s3->put("./file_name.tif", $s3_file);
Posted by: Guest on November-29-2020
0

laravel move file from local to s3

se IlluminateHttpFile;
use IlluminateSupportFacadesStorage;

// Automatically generate a unique ID for file name...
Storage::putFile('photos', new File('/path/to/photo'));

// Manually specify a file name...
Storage::putFileAs('photos', new File('/path/to/photo'), 'photo.jpg');
Posted by: Guest on November-29-2020
0

laravel 7 upload file s3

$image = Image::create([
    'filename' => basename($path),
    'url' => Storage::disk('s3')->url($path)
]);
Posted by: Guest on August-04-2020

Browse Popular Code Answers by Language