Question

I need to retrieve the file for a particular key.but I m not able to implement GQLQuery in blobstore.

    String key=request.getParameter("key");
    BlobInfoFactory infoFactory = new BlobInfoFactory();

with the help of this key, I need to take out the file from the blobstore. for the information key is similar to the blobstore key.As i m new for Google Datastore. unable to do that

Was it helpful?

Solution

Please refer - Serving a blob

 public void doGet(HttpServletRequest req, HttpServletResponse res)
        throws IOException {
            BlobKey blobKey = new BlobKey(req.getParameter("blob-key"));
            blobstoreService.serve(blobKey, res);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top