Question

I tried to ask this on the GAE group, but got nothing, and I'm getting nowhere fast with this problem...

I have an installed app submitting files to my GAEj app, via the blobstore service. This all works fine on the dev server, but in production, the blobstore accepts the upload, then calls my app with the URL supplied to blobstoreService.createUploadUrl(), correctly passes along all the parameters that my client supplied along with the uploaded file to this URL, but returns an empty map for the blobstoreService.getUploadedBlobs() call, at which point my app crashes, and GAE returns a 500 to my client. This would all be much easier to debug if the blobstore gave some indication, somewhere, of what was going wrong.

Also, I don't see any created blobs in the dashboard, so I know they're not being created.

Thanks! -----EDIT----- Here is a fiddler http capture of the data:

POST http://MYAPP.appspot.com/_ah/upload/?oauth_token=1%2FTRaFrr7-6m55jqdJBnFovQwS51WsrmNKmhHfTNxEWro&oauth_consumer_key=anonymous&oauth_nonce=I5HbpgtW&oauth_signature_method=HMAC-SHA1&oauth_signature=Ls7CWohqj2829nJV8bIGj2EkDCQ%3D&oauth_version=1.0&oauth_timestamp=1288878313/AMmfu6YAKuBqyq8M8zQ5hpHUAY88LJjYmbPj6Y7663GrW5qa8dYwWLWXpRHtktu_C1dyozhoH8CS2It6hjNQTbBsoFgFcERR_8680rpcv0fnZ1rl_P_0mDw/ALBNUaYAAAAATNK7QSoSJ5sWOxotMwyHoShtadRvqw8P/ HTTP/1.1
Content-Type: multipart/form-data; boundary=-----------------------------28947758029299
User-Agent: MyAppClient
Host: MYAPP.appspot.com
Content-Length: 4678
Expect: 100-continue

-------------------------------28947758029299
Content-Disposition: form-data; name="UploadToken"

aglvcGVua2xlaW9yGgsSEkdvb2dsZUFjY291bnRzVXNlchihnAEM
-------------------------------28947758029299
Content-Disposition: form-data; name="LastInChain"

True
-------------------------------28947758029299
Content-Disposition: form-data; name="CardID"

6f1e4c6a-54b6-49a6-96fc-22e08db3dde4
-------------------------------28947758029299
Content-Disposition: form-data; name="MediaType"

Image
-------------------------------28947758029299
Content-Disposition: form-data; name="HtmlKey"

img0.jpg
-------------------------------28947758029299
Content-Disposition: form-data; name="Position"

0
-------------------------------28947758029299
Content-Disposition: form-data; name="ParentID"

4d386a6e-b742-4249-a2f0-ff33a2300ff0
-------------------------------28947758029299
Content-Disposition: form-data; name="file"; filename="img0.jpg";
Content-Type: image/jpg

�����JFIF��`�`�����C�
*BINARYSTUFFREMOVEDFROMHERE*    

-------------------------------28947758029299--
Was it helpful?

Solution

I finally fixed my problem, the villain in my case was a semi-colon.

The line

"Content-Disposition: form-data; name="file"; filename="img0.jpg";"

should instead be:

"Content-Disposition: form-data; name="file"; filename="img0.jpg""

Though this is certainly my mistake, I really wish that the blobstore would fail in a less opaque way, and also that the parser would behave identically on development and production.

Between my mistake, and this question: AppEngine BlobStore upload failing with a request that works in the Development Environment I guess the blobstore parser can be a temperamental animal. =)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top