Export to GitHub

gwtupload - issue #68

Can't upload a empty file, why ?


Posted on Aug 12, 2010 by Helpful Lion

In UploadServlet class

and in method protected String parsePostRequest(HttpServletRequest request, HttpServletResponse response)

we have for (FileItem fileItem : uploadedItems) { if (fileItem.isFormField() || fileItem.getSize() > 0) { sessionFiles.add(fileItem); } else { logger.error("... error File empty: " + fileItem); error += "\nError, ..."; } }

Why this choice ?

Comment #1

Posted on Aug 23, 2010 by Grumpy Elephant

Not sure, but maybe I thought an empty file was not useful, if you thing this is an issue I could remove the restriction

Comment #2

Posted on Aug 23, 2010 by Helpful Lion

Yes, i agree an empty file isn't useful, but i can't refuse a user to do that in my app. It's a user problem, not a technical problem. So, i think the restriction should be removed. If you ok with that.

Thanks

BoomBoom

Comment #3

Posted on Dec 29, 2010 by Grumpy Elephant

fixed in r818

Thanks for reporting

Status: Fixed

Labels:
Type-Defect Priority-Medium