Answers for "laravel upload file to s3"

PHP
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
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
0

laravel 7 upload file s3

return Storage::disk('s3')->response('images/' . $image->filename);
Posted by: Guest on August-04-2020
0

laravel 7 upload file s3

$path = $request->file('image')->store('images', 's3');
Posted by: Guest on August-04-2020

Browse Popular Code Answers by Language