-
27 Sep 2012 9:30 AM #1
Unanswered: Removing 'fakepath' from fileuploadfield in 4.1.1
Unanswered: Removing 'fakepath' from fileuploadfield in 4.1.1
Is there a good way to remove the 'fakepath' stuff from the displayed value in a file upload field so instead of something like "c:\fakepath\myfile.txt" it displays only the filename (myfile.text) instead?
I thought I might be able to do this through setValue but it doesn't do anything any more, for good reason I'm sure.
Also, not sure if this is frowned upon, but in using the new forum search functionality (which I really like btw!) it looks like this question may have been asked in the premium forums: http://www.sencha.com/forum/showthread.php?240197
-
1 Oct 2012 5:38 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,185
- Vote Rating
- 194
- Answers
- 433
You would have to display the path yourself. The browser add fakepath this as a security feature.
Scott.
-
2 Oct 2012 6:09 AM #3
Adding the following to the fileuploadfield config is working for me:
Code:listeners: { change: function(f,v){ var node = Ext.DomQuery.selectNode('input[id='+f.getInputId()+']'); node.value = v.replace("C:\\fakepath\\",""); } },
-
26 Dec 2012 5:55 PM #4


Reply With Quote