Hi Didier, I'm not sure if I understand your idea. The get method you pointed is a method of a map that is retrieved by the getUploadedBlobs, from BlobstoreService right? If so, it only make sense to call getUploadedBlobs right after the blobstore redirect the request back to my application (according to the javadoc).
Your idea is to store the blobs` keys regardless my form is stored or not? On Fri, Apr 8, 2011 at 1:27 AM, Didier Durand <[email protected]>wrote: > Hi, > > You get the key of your blob via BlobKey blobKey = blobs.get("myFile") > (see http://code.google.com/appengine/docs/java/blobstore/overview.html) > > So, I would personally store all the "myFile" ids that I distributed > from the server side and in an asynchronous queue task would do to see > if the get() above responds with a Key. If yes, you decide with other > data if orphaned or not and delete appropriately. > > regards > > didier > > > On Apr 7, 8:46 pm, "[email protected]" > <[email protected]> wrote: > > Hi there. > > > > One of the features of my application requires the upload of image files > > along with other data in a form. That is, my entity is composed of both > some > > fileds (text, currency, dates, etc) and an image file. > > > > As far as I could see, to deal with the blob store service is a two phase > > process. In my case, I submit a form with both the image and the > remaining > > data, this post is handled by the blob store service, which stores the > image > > and redirects the request back to my application, with the blob key and > the > > remaining data of the form. But, what happens if, by some reason, the > > remaining of the post data cannot be persisted by my application? In > cases > > like that, how can I cope with orphaned blobs in the blob store? I took a > > look at the BlobstoreService API, but could not find any method that > lists > > all the keys of persisted blobs. > > > > Actually, I have some ideas for detecting and deleting such orphan blobs, > > but I'm afraid I can be missing something obvious since I'm still > starting > > with GAE. > > > > Any advice in this sense? > > > > Loreno > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
