Answers for "download image from s3 by file name laravel"

PHP
0

laravel s3 download file

return Storage::download('file.jpg');

return Storage::download('file.jpg', $name, $headers);
Posted by: Guest on August-05-2020
0

laravel download file from s3

$attachment = TicketAttachment::find($id);
$headers = [
    'Content-Type'        => 'application/jpeg',
    'Content-Disposition' => 'attachment; filename="'. $attachment->name .'"',
];
return \Response::make(Storage::disk('s3')->get($attachment->url), 200, $headers);
Posted by: Guest on October-21-2020

Code answers related to "download image from s3 by file name laravel"

Browse Popular Code Answers by Language