When I Upload Something It Says Fakepath
-
three Jul 2013,i:20 AM #1
Sencha Premium Member
Answered: Chrome shows always "c:\fakepath\..." in upload field instead of the right path
Hi I'm using Chrome Version 27.0.1453.116 m.
I've a problem in my custom application using File Upload Field
that happens also in online samples application.Employ
http://docs.sencha.com/extjs/4.two.ane/e...le-upload.htmlUse the outset example "Bones File Field", then click "Browse..." push button and select the file you desire.
The problem is that in upload field the file proper noun is correct but the file path shows ever: c:\fakepath\...
Besides using the "Get File Path" push button under the upload field is shown the wrong path.Then the upload does not works correctly (due to wrong path, I imagine)
With Firefox using the same example are there no problem,
Please, could someone help me to solve this trouble?
- All-time Answer
Posted by existdissolve
Originally Posted by dtex-lab
Moreover, I tin't understand why one would need that anyway. You certainly don't demand it to upload a file, and then the simply reason would exist a nefarious 1 (or a misguided one that doesn't understand how file uploads piece of work).
I would personally HATE to know that someone was tracking or logging the path to a file on my computer, and would never use the site if I knew they were able to practise that. They tin can take no possible reason to need to know that, unless of course I am installing a plan (not JavaScript, of course) in which I grant access to that kind of information.
-
iii Jul 2013,four:05 AM #two
Originally Posted by pegaso52it
The result of getValue() is entirely browser-dependent.
Still, this should have nothing to do with the upload succeeding or failing, as information technology is the content of the form field, not the path, which is ultimately put in the mail to the server.
I have several applications that exercise file uploads with Ext.course.field.File, so there may be an issue with your implementation if it is succeeding in one browser simply failing in some other. Can yous share some of the code that is declining?
-
4 Jul 2013,i:twoscore AM #three
Sencha Premium Member
Hi, thank for your answer, beginning of all.
Alibi me if I have not respond quickly, just I was very decorated with other activities.That's my code that works using Firefox:
Code:
MY.Ext.form.MYFileUploadField = Ext.extend(Ext.ux.form.FileUploadField, { bindListeners : office() { MY.Ext.form.MYFileUploadField.superclass.bindListeners.telephone call(this); this.fileInput.on( { scope : this, change : function() { var 5 = this.fileInput.dom.value; this.setValue(v); this.iFileInputHidden.dom.value = v; this.fireEvent('fileselected', this, five); } }); }, createFileInput : function() { MY.Ext.form.MYFileUploadField.superclass.createFileInput.call(this); this.iFileInputHidden = this.wrap.createChild( { id : this.hiddenId, name : this.hiddenId, tag : 'input', type : 'hidden', value : '' }); } });
-
four Jul 2013,2:07 AM #4
Originally Posted by pegaso52it
-
five Jul 2013,iv:31 AM #five
Ext JS Premium Fellow member
Every bit pegaso52it wrote
in the official example at
http://docs.sencha.com/extjs/four.2.1/e...le-upload.htmlthe problem exists
then nothing to do with extension done.
from official example, please fill up the Basic File Field using the scan button you can see that the fully qualified path proper name is starting with C:\fakepath and not the 1 really selected.
and also in the example clarification it says
"The file path reported by the getValue method will"I read in docs that the setValue is "browser dependent",
The goal is to know from which location of the client the file is uploaded
Anyway i ostend that upload is working anycase
Probably if you lot are using that informtion for yous logging... information technology is wrong and I agree it is a problem in some cases
-
five Jul 2013,4:53 AM #6
Originally Posted past dtex-lab
Moreover, I tin't sympathise why i would need that anyway. You certainly don't need it to upload a file, so the but reason would be a nefarious one (or a misguided one that doesn't empathise how file uploads work).
I would personally HATE to know that someone was tracking or logging the path to a file on my computer, and would never employ the site if I knew they were able to do that. They tin can have no possible reason to demand to know that, unless of class I am installing a program (not JavaScript, of course) in which I grant access to that kind of information.
-
sixteen Jul 2013,5:16 AM #7
Sencha Premium Member
Thank you for your assistance, I have solved the problem.
-
13 Feb 2014,5:17 AM #8
Sencha User
fakepath problem
Hi,
How you slved information technology?? Can yu share information technology with me. I am also getting same error as C:\fakepath\*...xls in chrome.
Thanks in advance.
-
thirteen Feb 2014,6:34 AM #9
Originally Posted by mrinal3199
-
thirteen February 2014,11:05 PM #x
Sencha User
How-do-you-do,
It's a combination of html and coffee script file which information technology is calling. You mean to say there is no style to get the correct filepath in chrome in this style? I could sympathize the security which chrome provides in looking for local drives. But is in that location any alternate way to get the required filepath non just the filename every bit we are getting in IE afterward setting changes?Thanks again
Source: https://forum.sencha.com/forum/showthread.php?267159-Chrome-shows-always-quot-c-fakepath-quot-in-upload-field-instead-of-the-right-path
0 Response to "When I Upload Something It Says Fakepath"
Postar um comentário