📜  laravel s3 下载文件 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:21.390000             🧑  作者: Mango

代码示例3
$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);