Unfortunatelly my client wants to allow for large file (~50MB) upload with frontend form. While uploading “normal” files (~3MB) works well with
acf_form() larger files (probably) triggers PHP timeout during form submit.
Instead of submitting a form I receive (in browser console) following error:
net::ERR_INCOMPLETE_CHUNKED_ENCODING which seems to be connected with PHP timeouts.
Is there anything I can do to support large files, besides modifing PHP timeout which is rather quickfix than real solution?
I don’t think this is a timeout problem. I did a search on google for ‘net::ERR_INCOMPLETE_CHUNKED_ENCODING’ and the first couple of resources it found indicate that the problem might be deeper than that. Not sure if these will help you http://stackoverflow.com/questions/29894154/chrome-neterr-incomplete-chunked-encoding-error and http://stackoverflow.com/questions/23217824/neterr-incomplete-chunked-encoding. You might want to look at some of the others in the search results https://www.google.com/search?q=net%3A%3AERR_INCOMPLETE_CHUNKED_ENCODING&ie=utf-8&oe=utf-8
Thanks for your assistance but smaller files e.g. 10MB are transferred without any problems so PHP timeout seems to me very reasonable e.g. http://stackoverflow.com/questions/16102809/how-to-upload-large-files-above-500mb-in-php
I was wondering if there is some kind of file upload field which will use chunked upload plugin e.g. plupload (http://www.plupload.com/)?
I attempted uploading files larger than 10M using a file field when logged out of a test site. I have extremely slow upload speeds from my current location and it too over 1 hour to upload a 20M file. I wouldn’t want to try to upload anything bigger from here, but the file uploaded correctly and PHP did not time out. To be honest I can’t say why you’re seeing a problem, but I would definitely be looking at finding a different way to upload files if my client was insisting that they needed to allow 50M file uploads on the front end of the site, for example, instructions on how to compress files and only excepting .zip files would be a place to start. Either that or building a custom field type https://www.advancedcustomfields.com/resources/creating-a-new-field-type/ that uploaded using some other method than http, as far as I know such a field does not yet exist.
Thanks. You got it right. I need to investigate this issue further as my localhost based tests (with Chrome Dev Tools which limits available upload speed) shows that even 30 minutes long uploads are successful. I’ll try to remember to post here the solution (if I find it).
Anyway, some JS based file upload with progress bar would be a nice field to have, but I didn’t find one either.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.