Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why might a file only be partially uploaded?

Tags:

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?

like image 402
Mike Moore Avatar asked May 30 '10 03:05

Mike Moore


People also ask

Why is a file not uploading?

Be sure to clear cache/cookies. Close your browser and re-open new windows. Check if you need to install updates to your browser or OS. Restart your computer.

Why do uploads fail?

If you received an Upload Failed message, that means that your media file failed to reach our system. The reason your file may have failed is that there was an interruption in your internet connection or you accidentally navigated away from the page.

What happens when a file is uploaded?

Uploading is the transmission of a file from one computer system to another, usually larger computer system. From a network user's point-of-view, to upload a file is to send it to another computer that is set up to receive it.


1 Answers

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.

like image 121
halfdan Avatar answered Oct 26 '22 23:10

halfdan