Untested, and no guarantees, but try something like this:
String mimeList = "application/vnd.ms-excel,application/
msexcel,application/x-msexcel,application/x-ms-excel,application/
vnd.ms-excel,application/x-excel,application/x-
dos_ms_excel,application/xls,application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet";
myFileUploadWidget.getElement().setPropertyString("accept", mimeList);
Reference:
http://www.w3.org/TR/html-markup/input.file.html
On Jul 5, 11:18 pm, aman <[email protected]> wrote:
> I am using the basic FileUpload control in gwt and wanted to add the
> filter on the extensions allowed in the browsing window, which
> restrict the user to select only specific extensions (like xls,xlsx
> etc). Tell me how I can achieve this as I want to restrict on the
> browsing window itself and cant wait for the Button submit event.
>
> Thanks
>
> Amandeep
--
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.