【问题标题】:Cannot read file from cloud storage无法从云存储读取文件
【发布时间】:2012-07-05 08:47:28
【问题描述】:

读取文件的代码

boolean lockForRead = false;
String filename = "/gs/smsspamfilteraptosin/Data";
AppEngineFile readableFile = new AppEngineFile(filename);
FileReadChannel readChannel = fileService.openReadChannel(readableFile, lockForRead);


BufferedReader reader = new BufferedReader(Channels.newReader(readChannel, "UTF")); => I think something went wrong here.I put a string test and after this line the string test was  null.
String line = reader.readLine();

云存储路径

smsspamfilteraptosin/Data

应用的 ACL 权限

FULL_CONTROL

当我尝试打印行时,结果为空。
这就是我在管理日志中看到的:此应用程序不允许 API 服务
有人可以告诉我我做错了什么吗?
谢谢。

【问题讨论】:

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


    【解决方案1】:

    当我尝试按照http://www.youtube.com/watch?v=v9TG7OzsZqQhttp://www.youtube.com/watch?v=v9TG7OzsZqQ 上的教程进行操作时,我收到了相同的“API 服务不允许此应用程序”错误

    我的 Cloud Endpoint REST API 在我的本地开发机器上运行良好,但在 当我部署到 App Engine 时。

    “此应用程序不允许 API 服务”是否可能是依赖于我们未启用的付费功能的结果?

    更新:检查 GAE: API serving not allowed for this application 以获得(部分?)解决方案。

    【讨论】:

      【解决方案2】:

      您没有执行prerequisites 中列出的操作,这会阻止您从应用引擎使用 GCS。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-08-04
        • 2020-10-14
        • 1970-01-01
        • 1970-01-01
        • 2016-12-29
        • 2017-10-08
        • 2023-03-30
        相关资源
        最近更新 更多