I get blobkey from datastore.
Now I want to use this blobkey to get content type of blob in blobstore.
How to do it?
I get blobkey from datastore.
Now I want to use this blobkey to get content type of blob in blobstore.
How to do it?
You can try this code
BlobInfoFactory bif = new BlobInfoFactory();
BlobKey bk = new BlobKey("<your blobkey>");
BlobInfo blobInfo = bif.loadBlobInfo(bk);
if(blobInfo == null)
// The blob with the provided blobkey does not exists
else
String contentType = blobInfo.getContentType();