Retrieve a Blob by ID/Name from Google Blobstore -


storing images in blobstore working because of serving url doesn't require frontend instances.

servingurloptions options = servingurloptions.builder.withblobkey(blobkey); string url = imagesservice.getservingurl(options); 

after uploading images throw away filenames (it auto generated). blobs in datastore console have kind __gsfileinfo__ , have fields follows:

key: agljbhv0dhj3zwjyy... write ops: 10 id/name: encoded_gs_key:l2dzl2nsdxr0ci81mdkxzmflmc1imgvhltqxnzctymu... content_type: application/octet-stream creation: fri may 08 15:13:26 cdt 2015 filename: /gs/bucket1234/5091fae0-b0ea-4177-be46-36cc7df5a36c 

i noticed serving url same id/name - handle blob/image. there way get blob id/name?

if trying retrieve blob itd blobkey use:

 blobkey blobkey = new blobkey(req.getparameter("blob-key"));  blobstoreservice.serve(blobkey, res); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -