Trying to extract a file from blobstore and send it as an email attachment using the Google engine

I am trying to create an application that will require me to receive the data stored in blobstore and send it as an attachment. Does this app support Google? From the documentation, I could not find a way to extract data from blobstore for processing in the application. Can someone please tell me how to do this? Sample code and / or pointers to relevant online resources would be really helpful.

+3
source share
4 answers

Now you can read data from blobstore using BlobReader , which provides a simple file interface.

+2
source

At the moment, it seems this is not possible. You can force the file to be sent to the client .

Perhaps you could do what you need using Datastore Blob ?

It is also worth noting that Blobstore is “experimental” and may change. It is possible to add additional functionality that will allow you to do what you are trying to do.

+2
source

, " ". http://code.google.com/appengine/docs/java/blobstore/overview.html#Complete_Sample_App

1) , blobkey blob.

public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
        BlobKey blobKey = new BlobKey(req.getParameter("blob-key"));
        blobstoreService.serve(blobKey, res);
    }

2) URLFetchService.fetch(java.net.URL url) blobkey blob ( ) .

0

Source: https://habr.com/ru/post/1727132/


All Articles