Upload to Appengine Blobstore in Android
Asked Answered
B

2

6

I'm working on a simple multimedia messaging app for Android, and I was trying to use Google AppEngine's BlobStore as my cloud storage for the various image, video, and audio files that will be transferred. However, all of the examples and such that I've seen for uploading to blobstore assume that I'm doing it via an HTTP form, and so I'm kind of at a loss as to what to do.

I've seen several people asking the same question, but none of them seem to ever get a satisfactory answer. Can I or should I use AppEngine's blobstore in this way, and if so how do I go about doing it?

Thanks, SO.

Bamby answered 25/3, 2011 at 18:29 Comment(2)
Can you not make a request to your app to get the upload url then send the data in a multipart/form-data encoded post request to that url?Vary
Try this : [Step by Step Description][1] [1]: #16247234Langobard
I
4

You could go with something like this:

1. On Google App Engine, create a Web Handler that calling blobstore.create_upload_url() returns an action_POST_URL

2. On Android, post the image to the action_POST_URL using HttpClient and MultipartEntity.

Interstitial answered 25/3, 2011 at 21:12 Comment(1)
If I follow that method, How do I get the uploaded file URL? is that part of the post response?Silas
P
2

for Java

    BlobstoreService blobstoreService = 
                             BlobstoreServiceFactory.getBlobstoreService();
    String action_POST_URL= blobstoreService.createUploadUrl(redirect_URL);
Philippeville answered 18/5, 2011 at 19:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.