Different behaviour of getUploads() in development and production

37 views
Skip to first unread message

Arjan Broer

unread,
May 4, 2012, 5:00:23 PM5/4/12
to google-a...@googlegroups.com
I have created some code to check the submit of a form for uploads. This works very well in my local development instance. But when i run this same code in production it always finds an upload even though i am not uploading a file.

BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
Map<String, List<BlobKey>> uploadedBlobs = blobstoreService.getUploads(request);
if (uploadedBlobs != null && uploadedBlobs.containsKey("thumb")) {
LOG.debug("Found an upload for thumb");
BlobKey thumbKey = uploadedBlobs.get("thumb").get(0);
userEditForm.setThumbNailKey(thumbKey.getKeyString());
}
userService.updateUser(account, userEditForm);


When i do not select a file in the form, on development the thumbnailKey is not set, but on production it is set.

Any suggestions?

Stuart Langley

unread,
May 5, 2012, 1:10:20 AM5/5/12
to google-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages