Hello Odeyemi, If I got your problem right, yes, you can use the Files API to create an image blob, then use the ImageService to create a dedicated URL to serve that image as Jeff said. You can safely cache the generated URL, it will be available as long as you don't delete de blob.
Double check that you called the closeFinally as documented here when creating the blob, and use the method getBlobKey<http://code.google.com/intl/en/appengine/docs/java/javadoc/com/google/appengine/api/files/FileService.html#getBlobKey%28com.google.appengine.api.files.AppEngineFile%29>from the Files api to get the blob key after you finalize your file. You can then use this to call the ImageService.getServingUrl(). This proccess works for both your unit tests and the local dev server. Hope this helps! Best Regards, -Ronoaldo Em quinta-feira, 1 de março de 2012 14h19min41s UTC-3, drecute escreveu: > > On Thu, Mar 1, 2012 at 3:03 PM, Jeff Schnitzer <[email protected]>wrote: > >> Look at the documentation for the images service. There is a method that >> gives you a serving url directly to the CDN. >> >> Warning: This method has a surprising amount of latency, you probably >> want to cache the value in memcache for a reasonable duration. >> >> Can the Image Service work with the filesystem where the blob is stored? > Everytime I try to retrieve it using the method you mentioned > getServingUrl(blobkey), I get the error: > > [java] java.lang.IllegalArgumentException: Failed to read image > [java] at > com.google.appengine.api.images.ImagesServiceImpl.getServingUrl(ImagesServiceImpl.java:222) > > > > Also, I'm think this action is not possible on the dev server. > >> >> On Thu, Mar 1, 2012 at 7:42 AM, Kayode Odeyemi <[email protected]> wrote: >> >>> Hi everyone, >>> >>> I have images uploaded to the blobstore using filesystem API. The files >>> have been uploaded successfully and I can see the blobs in the respective >>> directory. >>> >>> But then, how do I decode these files such that when sent back to the >>> client or retrieved using the blobstore API, I'm able to get an image? >>> Right now /blobstore/writable:xxx is not useful for me because when I wrap >>> the path in <img src="/blobstore/writable:xxx" />, it doesn't give me an >>> image. >>> >>> Any help is appreciated. >>> >>> Thanks >>> >>> >>> -- >>> Odeyemi 'Kayode O. >>> http://ng.linkedin.com/in/kayodeodeyemi. t: @charyorde blog: >>> http://sinati.com/tree/java-cheat-sheet >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google App Engine" 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?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" 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?hl=en. >> > > > > -- > Odeyemi 'Kayode O. > http://ng.linkedin.com/in/kayodeodeyemi. t: @charyorde blog: > http://sinati.com/tree/java-cheat-sheet > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/uX0cs5hKeoEJ. 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?hl=en.
