[英]How to use blobKey to pull out the names,content/type and size of the file from blob store in Google app engine?
[英]How to get blob filename from BlobKey on app-engine
這是服務器端的問題。 我有一個BlobKey,僅此而已。 如何從所說的BlobKey中獲取Blob文件名? 我知道如何將
ServingUrlOptions options = ServingUrlOptions.Builder.withBlobKey(blobKey).secureUrl(false);
String servingUrl = ImagesServiceFactory.getImagesService().getServingUrl(options);
但是,如何獲取Blob Viewer
保存/顯示的文件名,例如image_1.png
? 我正在使用Java-不是python。
使用BlobInfo
類。
BlobInfoFactory blobInfoFactory = new BlobInfoFactory();
BlobInfo blobInfo = blobInfoFactory.loadBlobInfo(blobKey);
String fileName = blobInfo.getFilename();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.