开发者

Uploading an Image object with GWT

开发者 https://www.devze.com 2023-03-24 15:20 出处:网络
So this is what i want to do. I have an Image object ( http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html ) and i want that uploaded to the Blobstore.

So this is what i want to do.

I have an Image object ( http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Image.html ) and i want that uploaded to the Blobstore.

So this is my problem.

The formpanel i'm trying to use only works when the user actuall开发者_如何学JAVAy supplies a file directory, so there is no way i can give an image adress to the form to upload like this:

blob:http://127.0.0.1:8888/6276f066-d415-45f4-984b-e0f98c542c50

So my question is:

How would i be able to upload an image from such a source to the blobstore.

Is it even possible?

Any and all help is much appreciated.


Gwt's Image represents and <image> tag, which in turn represents an image loaded from server.

AFAIK, there is no way for javascript (and GWT) to get the data from <image> or Image, so consequentially it can not be uploaded.

Since the data for Image comes from server, why do you need to upload it back to server? If you are doing some selections, couldn't you just get the URL of the image and sent that to server?

0

精彩评论

暂无评论...
验证码 换一张
取 消