My application generates binary data (compressed xml) and saves it to the Google App Engine Blobstore. I want to return a public URL that clients can use to access this binary file from anywhere, without needing to go through AppEngine and my Java servlets. I know it’s possible to get this kind of URL for images using ImagesService#getServingUrl, but what about for other types of files?
I create my file like this:
FileService#createNewBlobFile("application/octet-stream", "myfile.bin");
When I call AppEngineFile#getFullPath() I get something like:
/blobstore/writable:a2c0noo4_LNQ0mS6wFdCMA
I can see the file created in my dev filesystem with a different random name. What’s its URL?
According to the docs, there’s no public URL for objects in the blobstore. You can only access it through the Blobstore API from your app. So if you want your blobstore objects to each have a URL, you’d have to create your own handler for that, which of course will have to pass through AppEngine and your Java servlets.
I think the
ImagesService#getServingUrldoesn’t generate a Public URL for the images in blobstore. That URL doesn’t really point directly to your blobstore data. It points to an image service that is able to access your blobstore, and serves your image for you through its own high performance infrastructure.