Hi,
I am using form panel in my GWT client code. I need to detect the
content type on my server side of the file being upload. Now strange
thing that is happening is something defined below:
When i upload a image i get the correct content type "image/jpeg" but
when i upload a video of type mp4 i used to get "application/octet-
stream" while i should get "video/mp4".
Now i test it out using the simple JSP based form and file upload
input type widget and strangely i get the the correct content type for
each.
I am not able to get where i am mistaking or it is the bug of GWT
Here is my code to make a GWT client side file upload widget
--------------------------------------------------------------------------------------------------------------------
VerticalPanel userVideoContainer = new VerticalPanel
();
this.add(userVideoContainer);
FormPanel formPanel = new FormPanel());
formPanel .setEncoding(FormPanel.ENCODING_MULTIPART);
formPanel .setMethod(FormPanel.METHOD_POST);
formPanel .setAction(getRequestUrl());
userVideoContainer.add(getUserVideoFormPanel());
FileUpload fileUpload = new FileUpload());
fileUpload .setName("file");
fileUpload .add(getUserVideoUpload());
Button uploadButton = new Button("Upload");
userVideoContainer.add(uploadButton);
--------------------------------------------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---