oneduo / nova-file-manager

The most advanced File Manager for Laravel Nova, feature rich and robust build.
https://oneduo.github.io/nova-file-manager/
MIT License
142 stars 39 forks source link

Error 413 when uploading large files #393

Closed VGirol closed 5 months ago

VGirol commented 6 months ago

Hello,

I can not upload files larger than the maximum file size defined in php.ini.

For each chunk uploaded, the server responds with an error 413 : the \Illuminate\Foundation\Http\Middleware\ValidatePostSize middleware throws an Illuminate\Http\Exceptions\PostTooLargeException exception.

Environment Laravel Framework 10.48.10 Laravel Nova 4

Expected behavior I expected that large files can be uploaded regardless of the limit defined in php.ini.

Screenshots

image

image

Rezrazi commented 6 months ago

Can you please check what the max post size is in your PHP config?

kprimdal commented 6 months ago

Just experience the same, has upload_max_filesize = 256M but cannot upload 71MB

kprimdal commented 6 months ago

Sorry, fixed after changing post_max_size also

Rezrazi commented 5 months ago

@VGirol perhaps to add some info to your issue, we currently use https://www.npmjs.com/package/resumablejs under the hood. What this library does, in combination with https://github.com/pionl/laravel-chunk-upload, is allow us to split up huge files into smaller chunks to allow for faster uploads and slightly reduce the load on the user's browser.

What you could check is the configuration of your server, both PHP and Nginx/Apache/etc to allow for a minimum size of uploads to match the required chunkSize of the library.

The current chunkSize is set to 50MB, unfortunately we didn't account for customization of this value, but we will gladly accept any PR.

Please feel free to reopen the issue if the problem persists, and please make sure to add any relevant data which would help us debug this together.

VGirol commented 5 months ago

Ok ! Thank you for your answer. I misunderstood the role of resumable.js. I thought it was used to bypass the minimum size of upload defined for the server and thus to allow upload of large files. My bad, And once again, thank you for the explanation.