I have Blobstore uploads working for GWT, but now I need my Android app to upload to Blobstore. I saw this post which explains how to upload once I have the URL, but it does not show getting the URL: Using Google BlobStore with an Android application
My questions are:
Thanks
I have it like this:
Widget.presenter.java:
uploadButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
//init action
imageService.getBlobStoreUploadUrl(new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
Window.alert("Oups Error at ImageUploaderPresenter");
}
@Override
public void onSuccess(String result) {
uploadForm.setActionUpload(result);
uploadForm.submit();
}
}
});
}
ImageServiceImpl.java:
@Override
public String getBlobStoreUploadUrl() {
//Map the UploadURL to the uploadservice which will be called by
//submitting the FormPanel
return blobstoreService.createUploadUrl("/imageUpload");
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.