1

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:

  1. what URL do I send the get to?
  2. what is the syntax of the get for blobstore?

Thanks

Community
  • 1
  • 1
Jeff of Brooklyn
  • 307
  • 6
  • 19

1 Answers1

0

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");
}
Martin
  • 1