Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
376 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...