I recently ran into two problems when uploading files to a Java gae application. I am using tecnique described in the blobstore document .
- With regular files, sometimes (say 15% of the time), the client gets "503 Service Unavailable".
- With high resolution images (example 7000x10000), the client always receives a "400 Bad Request".
In both cases, error messages are not logged on the server, drops are recorded correctly, but the successPath URL ( createUploadUrl callback ) is never called. It appears that the GAE endpoint handling the download fails for some reason.
My client is the XML address of the XML request wrapped in GWT:
public native void uploadWithXMLHttpRequest(UploadForm uploadForm) /*-{
var fd = new FormData();
var files = uploadForm.@mypackage.UploadForm::getFiles()();
for (var i = 0; i < files.length; i++) {
fd.append("uploadFile"+i, files[i]);
}
var xhr = new XMLHttpRequest();
//xhr.upload.addEventListeners... omitted
xhr.open("POST", uploadForm.@mypackage.UploadForm::getUploadUrl()());
xhr.send(fd);
}
/ ?
.