How to store image files from android app using mobile backend starter?

202 views
Skip to first unread message

Kevin Fan

unread,
Mar 20, 2014, 10:25:24 PM3/20/14
to google-a...@googlegroups.com
Hi,

I read we we use cloud storage with mobile backend starter by creating url

// get a secure URL for uploading a private file
URL url = blobEndpoint.getUploadUrl("receipts",  
                             getReceiptFileName(),"PRIVATE")
                       .execute().getShortLivedUrl());

but example is lacking.
Could you please provide a simple example of uploading a simple image file to cloud store using mobile backend starter?
Thank you.

Vinny P

unread,
Mar 26, 2014, 1:26:20 AM3/26/14
to google-a...@googlegroups.com
The only mobile backend starter tutorial is located here: https://developers.google.com/cloud/samples/mbs/deploy_backend

But if you specifically want to experiment with the image upload capability, the best way would be to run both the mobile backend starter and the Android client. You can see the README files for the mobile backend starter and the Android client to understand how they're deployed.
 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Anshul Goel

unread,
Apr 26, 2014, 9:09:14 PM4/26/14
to google-a...@googlegroups.com

Hi
I have already generated the client library and trying the get upload url like this:

try {
           
BlobEndpoint blobEndpoint = new BlobEndpoint();
           
String url = blobEndpoint.getUploadUrl("profileImages","images","PRIVATE").execute().getShortLivedUrl();
       
} catch (IOException e) {
            e
.printStackTrace();
       
}

But its giving this error:
No enclosing instance of type Mobilebackend is accessible. Must qualify the allocation with an enclosing instance of type Mobilebackend (e.g. x.new A() where x is an instance of Mobilebackend).

Vinny P

unread,
May 10, 2014, 1:26:31 AM5/10/14
to google-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages