In production Google App Engine `FileItemIterator.hasNext()` always returns false in blob upload callback request

Using latest Java Google App Engine 1.9.18.

In production Google App Engine FileItemIterator.hasNext() always returns false in blob upload callback request.

Details:

When a client is submitting a form with a file, I have him routed through Blobstore (.getBlobstoreService().createUploadUrl()), and when he is only submitting form fields, I have him submit directly to the handler.

When the client is submitting only form fields (no files), there’s no problem. However, when the client submits to .createUploadUrl() url, in dev server it works, but in production org.apache.commons.fileupload.FileItemIterator.hasNext() always returns false. Even when the mentioned FileItemIterator chokes up, .getBlobstoreService().getUploads(req) properly returns the uploaded blobs. So this only happens when posting a file form through .createUploadUrl() in production.

There is a three year old open issue on this, but it does not seem to get much attention, so I presume it does not affect many people. I have starred the issue and posted a comment, but I don’t have much hope of getting a reply there. This is why I’m also posting here. Does anyone have any insight on this?


Source: java

Leave a Reply