FormPanel with FileUpload and HTML5

34 views
Skip to first unread message

Dana McDonald

unread,
May 27, 2012, 12:07:29 AM5/27/12
to Google Web Toolkit
I know this will only work in Firefox and Chrome...

I have access to a HTML5 Blob (JavaScripObject) through Drag&Drop and
now I want to set the value or add it to FileUpload. I'm wanting to do
this all with HTML Forms and direct communication with the Browser to
Amazon S3 bypassing any server: http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTForms.html

I've created my FormPanel() added all the necessary Policies,
Signatures, bucket, key, etc I've added FileUpload to the form but how
to I add my HTML5 File or Blob?

I've tried creating an inputElement, setting my JavaScriptObject Blob
to it and then calling FileUpload.wrap(inputElement) - no good.

Any ideas on how to attach my JavaScripObject Blob to FileUpload
(simulating a file select in the chooser)

Hope that makes sense.

Thanks!
Dana

Joseph Lust

unread,
May 30, 2012, 3:52:14 PM5/30/12
to google-we...@googlegroups.com
What have you achieved so far? I would:
  1. Get the AWS POST to S3 example working with pure HTML (no GWT).
  2. Recreate the same form in GWT using UiBinder or imperatively (i.e. new FormPanle()...).
  3. Try sending it through the form.
From long ago discussions, GWT should be able to handle this POST case with XHR in an iFrame for you.

I know you're using DnD, but have you got it working sans DnD? Also, are you sharing your AWS keys publicly? Seems like a bit of a security hole to do this sans server.




Sincerely,
Joseph
Reply all
Reply to author
Forward
0 new messages