getting blobstore to callback to endpoint method

∥☆過路亽.° 提交于 2019-12-09 06:58:35

问题


I am developing an app-engine connected android project using the eclipse plugin. When I upload an image to the blobstore, how do I make it callback an endpoint method? I find great posts here that can be used as reference to understand my question better (if you need to).

using blobstore with google cloud endpoint and android

Saving blobs with Google Endpoint

So really, I want to know how to make the callback url an endpoint method such as saveAnimalData below (I stole from referenced link)

@ApiMethod(name = "saveAnimalData", httpMethod = HttpMethod.POST)
        public String saveAnimalData(AnimalData request) throws Exception {
}

回答1:


You should be able to use

https://appid.appspot.com/_ah/api/apiname/version/saveAnimalData

As your final destination url when calling. blobstoreService.createUrl(destination) .

Just bear in mind that the request here is not your original submission. GAE will first call an internal URL (the one created by the blobstoreservice), store the blob and then call your destination URL so whatever info you send will be lost before reaching your endpoint (eg AnimalData will be null)



来源:https://stackoverflow.com/questions/22155920/getting-blobstore-to-callback-to-endpoint-method

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