I am trying to upload videos using laravel, filepond and s3 bucket. When file size is greater than 5Mb aws is not returning anything and even the file is not getting uploaded. But when the file size is less than 5Mb it's getting uploaded and I am able to get the s3 file path.
public function upload_video(Request $request){
if ($request->hasFile('link')) {
$video_link = Storage::disk('s3')->put('videos', $request->file('link'));
return $video_link;
}
}
Ensure PHP.INI settings were allowing uploads high enough. PHP.INI only allows 2M by default, so increased this limit to 20M. And Amazon S3 doesn’t like files over 5 MB uploading in one go, instead, you need to stream it through.
please use the given reference link to solve this issue by using streaming from server to S3.
https://www.webdesign101.net/laravel-s3-uploads-failing-when-uploading-large-files-in-laravel-5-8/