alexusmai / laravel-file-manager

File manager for Laravel
MIT License
1.14k stars 292 forks source link

Issue when uploading files larger than 2M to S3 #280

Open LeeByoungChul opened 2 years ago

LeeByoungChul commented 2 years ago

I am using it by integrating with ckeditor 4. Files of less than 2M are uploaded well, but files larger than 2M cannot be uploaded. Please tell me the solution. I want to limit the upload file size to 4M.

LeeByoungChul commented 2 years ago

Error message: A sha256 checksum could not be calculated for the provided upload body, because it was not seekable. To prevent this error you can either 1) include the ContentMD5 or ContentSHA256 parameters with your request, 2) use a seekable stream for the body, or 3) wrap the non-seekable stream in a GuzzleHttp\Psr7\CachingStream object. You should be careful though and remember that the CachingStream utilizes PHP temp streams. This means that the stream will be temporarily stored on the local disk.

LeeByoungChul commented 2 years ago

The server has the following settings. client_max_body_size 4M; in nginx.conf upload_max_filesize = 4M in php.ini 'maxUploadFileSize' => 4096, in file-manager.php