View Full Version : File Field displaying Invalid Path

11 Apr 2014, 8:48 AM
I am using Ext.form.field.File to upload a file.
After we select a file in the field, it is not displaying the actual path.
Instead of that it is displaying 'C:\fakepath\Test.png'

But actual path is 'D:\Test.png'.
How to make it to display the actual path?

11 Apr 2014, 9:07 AM
This is built into the browser as a security option. Here is a listener option that your can add the fileuploadfield to try and remove

listeners: {
change: function(f,v){
var node = Ext.DomQuery.selectNode('input[id='+f.getInputId()+']');
node.value = v.replace("C:\\fakepath\\","");