我有Blobstore上传为GWT工作,但现在我需要我的Android应用程序上传到Blobstore。我看到这篇文章解释了如何在我有URL后上传,但它没有显示获取URL: Using Google BlobStore with an Android application
我的问题是:
由于
答案 0 :(得分:0)
我喜欢这样:
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");
}