谷歌应用程序引擎(1.9.30版)API,用于上传Java文件
当运行以下代码时谷歌应用程序引擎(1.9.30版)API,用于上传Java文件,java,google-app-engine,google-cloud-storage,Java,Google App Engine,Google Cloud Storage,当运行以下代码时 private final GcsService GcsService=GcsServiceFactory.createGcsService(new RetryParams.Builder().retryminatests(0.retrymaxtures(1.build()); 公共无效上载(字符串bucketName、字符串objectName、字符串mime、字符串名称、字节[]内容)引发异常{ GcsOutputChannel oc=gcsService.createOr
private final GcsService GcsService=GcsServiceFactory.createGcsService(new RetryParams.Builder().retryminatests(0.retrymaxtures(1.build());
公共无效上载(字符串bucketName、字符串objectName、字符串mime、字符串名称、字节[]内容)引发异常{
GcsOutputChannel oc=gcsService.createOrReplace(新的GcsFilename(bucketName,objectName),新的GcsFileOptions.Builder().mimeType(mime.build());
oc.write(ByteBuffer.wrap(内容));
oc.close();
}
我得到以下例外情况:
com.google.appengine.tools.cloudstorage.NonRetriableException: com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Files API is disabled. Further information: https://cloud.google.com/appengine/docs/deprecations/files_api
我正在使用,App Engine SDK版本1.9.30,App Engine GCS客户端版本0.5。
我发现文件API已被Google应用程序引擎服务禁用
以上代码适用于App Engine SDK版本1.9.25
App Engine中是否有其他上传文件的解决方案?以上代码适用于App Engine SDK版本:1.9.25