View Full Version : filefield questions

12 Nov 2012, 4:10 PM

I have few questions on filefield:

1. How to make filefield editable? (to enter file path manually)
2. When i select file from dialog... the path getting displayed is something like c:\fakepath\<filename>. How to display actual path instead of "fakepath" string?
3. how to specify file filter option? eg. if i want to show only *.txt files in the dialog.


13 Nov 2012, 1:16 AM
1 From the docs: Because there is no secure cross-browser way to programmatically set the value of a file input, the standard Field setValue method is not implemented. The getValue method will return a value that is browser-dependent; some have just the file name, some have a full path, some use a fake path.

I think it is not possible because of security. But making it editable you can set editable: true

2. http://www.sencha.com/forum/showthread.php?173341-fakepath-on-file-upload

3 Not possible with javascript. Mayby you can set the Accept property on the input element, but I give not much hope getting that working.