Google App Engine和Cloud Storage API

时间:2014-11-26 17:29:01

标签: google-app-engine google-cloud-storage

我尝试通过 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.

0 个答案:

没有答案