brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

Uploaded files are not shown in S3 Bucket #107

Closed yugalkishoregoyal closed 1 year ago

yugalkishoregoyal commented 1 year ago

Hi Guys,

I'm trying to upload the files to the S3 bucket using the below code. Code is running successfully and shows no errors, but when the file never gets uploaded to the bucket.

$attachment = $request->file('attachment'); $attachment->storePubliclyAs("/attachments/", $request->name, ['disk' => 's3']);

I tried this locally on my dev machine and the file uploaded without any issues. So there is some problem with the serverless config only. I'm using the below-mentioned versions -

laravel/framework - v9.52.5 bref/laravel-bridge - 2.1.0 league/flysystem-aws-s3-v3 - 3.0

Note - I had read somewhere that Lambda returns the response before it is finished uploading the file, not sure this is the case here.

Let me know if you need more information.