11 Oct 2009 11:08 PM #1
Fileupload File Types
In the ExtJS example in fileupload, how can I force the file upload field to choose only specific file types? e.g. .jpg or .doc only?
ThanksGood design is more important than the underlying technology.
9 Nov 2009 11:11 PM #2
Anyone?Good design is more important than the underlying technology.
9 Nov 2009 11:15 PM #3
i have the same problem ,maybe it can't implement .
11 Nov 2009 6:56 AM #4
inside the Ext.onReady using the file example try this.
fbutton.fileInput.dom.accept = "text/html,text/plain";
Setting the accept property to the content type you need.
It is comma separated.
Let me know if this helps.
I looked in firebug while viewing the sample putting a break before the formpanel loaded from the Ext.onReady.
11 Nov 2009 8:03 PM #5
Hi, thanks for the reply, Tried your solution but I got no luck.Good design is more important than the underlying technology.
12 Nov 2009 6:56 AM #6
Yeah sorry should have clarified it works in Opera fine but not the other browsers. And Opera still gives All files so kinda point less.
For IE you can force the dom to use it by using the DOM.prototype.
But the other browsers just need to get this working lol.
It's been in the w3c for too long to not be supported.
25 Nov 2009 8:15 AM #7
I found that using swfupload for file uploads allows you to change the file type you want to see using the file dialog by using flash to control it.
The link above is a nice file upload queue that uses swfupload in which you can tell it what file types.
File types are assigned like so:
Separated by a semicolon.
Hope this helps
25 Nov 2009 7:10 PM #8
Thanks. Really cool.Good design is more important than the underlying technology.