Why might a file only be partially uploaded?
I am improving error-handling in my PHP file upload script and am trying to figure out how to handle UPLOAD_ERR_PARTIAL properly.
Should I prompt the user to try uploading the file again, or should I inform them that there is a more severe problem which is preventing them from uploading a possibly legitimate file?
Well, the file upload could be interrupted by:
The best you can do is to verify and protect the upload process with does verifications before actually send the file to the server...
The first time I've made a file upload script, I used 1 line of code, now, the same script seems like a web page ;)
EDITED (example for controlling extension and file size):
This is usually caused by the user canceling the upload.
You should prompt them to try again and if problems continue to contact the site owners, including as much detail as possible.
I have a same problem and was related with package libapache2-mod-php5filter , I remove the p and problem end. I hope someone can help.
UPLOAD_ERR_PARTIAL is given when the mime boundary is not found after the file data. A possible cause for this is that the upload was cancelled by the user (pressed ESC, etc).
I think it's enough to inform the user that the file is only partially uploaded and a retry will fix the problem.
This may help some people, but I had the same problem. My solution was to uninstall libapache2-mod-php5filter and replace it with the classical libapache2-mod-php5
This is an old post, but I had a random problem of UPLOAD_ERR_PARTIAL, and post my solution.
The problem is that after 2/3 upload I obtained an error of UPLOAD_ERR_PARTIAL, without any interruption by the client.
My problem was related to the Keep-Alive server.
I solved it by inserting at the end of the PHP script for uploading
that forces the closure of the connection. This has solved my problem.
I hope someone can help.
Thank to this LINK