我尝试通过 GAE 应用从 Google云端存储获取文件。
我用params(一个简单的HTML
表单)得到了桶和文件名,我称之为Servlet:
String bucket = req.getParameter("bucket");
String filename = req.getParameter("filename");
BlobstoreService blobstoreService = BlobstoreServiceFactory
.getBlobstoreService();
BlobKey blobKey = blobstoreService.createGsBlobKey("/gs/" + bucket
+ "/" + filename);
blobstoreService.serve(blobKey, resp);
我在 localhost 和 GAE 上收到此错误:
The API package 'blobstore' or call 'CreateEncodedGoogleStorageKey()' was not found.