How to get blob filename from BlobKey on app-engine

后端 未结 1 1023
北荒
北荒 2021-01-23 14:03

This is a server side question. I have a BlobKey and nothing else. How do I get the blob filename from said BlobKey? I know how to get the servingUrl as

ServingU         


        
相关标签:
1条回答
  • 2021-01-23 15:00

    Use the BlobInfo class.

    BlobInfoFactory blobInfoFactory = new BlobInfoFactory();
    BlobInfo blobInfo = blobInfoFactory.loadBlobInfo(blobKey);
    String fileName = blobInfo.getFilename();
    
    0 讨论(0)
提交回复
热议问题