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.
It turns out that the problem was caused by server limitations (of 32MB). So it’s definitely not related to the ACF.
Sorry for wasting your time.
It’s never a waste of time. This information may help others. How did you discover that the server was limited to 32M? I’m assuming that this max is in effect somehow even if you increase the php settings to allow for bigger files than this.
The server is administrated by a dedicated company. They told me about this limit while we were troubleshooting other issue connected with the website. I should probably ask them in the first place.
The topic ‘Large file upload via frontend form’ is closed to new replies.
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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.