Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Cloud Storage file from App running at local

I have just success on writing the file to the Google cloud Storage and reading it. Everything is fine after I deploy the app to appspot, but I got errors when running it local:

INTERNAL_SERVER_ERROR
    Caused by:java.io.IOException
        at com.google.appengine.api.files.FileServiceImpl.translateException(FileServiceImpl.java:586)
        at com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:561)
    ......

Does any one of you know how to access Google Cloud Storage file from localhost?

like image 539
ptgamr Avatar asked Mar 17 '12 18:03

ptgamr


1 Answers

The App Engine developer test environment supports a local simulation of Google Cloud Storage but doesn't provide RPC access to the real thing. So, your code should work in both environments, but you should think of the two modes as having distinct name spaces and content. So if, for example, your code expects to see a particular bucket foo containing an object bar, you'll want to separately create that bucket/object and ensure it contains reasonable content in order for the local developer mode to work as expected.

like image 161
Marc Cohen Avatar answered Oct 04 '22 04:10

Marc Cohen