Upload to Appengine Blobstore in Android

别说谁变了你拦得住时间么 提交于 2019-11-28 01:03:35

问题


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.


回答1:


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.




回答2:


for Java

    BlobstoreService blobstoreService = 
                             BlobstoreServiceFactory.getBlobstoreService();
    String action_POST_URL= blobstoreService.createUploadUrl(redirect_URL);


来源:https://stackoverflow.com/questions/5436593/upload-to-appengine-blobstore-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!