PDA

View Full Version : FAKE_PATH in opera by using Ext.ux.form.FileUploadField



Matthias_WB
8 Dec 2009, 12:12 PM
Hello community,

I use a upload-form with the "Ext.ux.form.FileUploadField"-plugin. In Mozilla FireFox 3.x/3.5x, Internet-Explorer 6/7/8 and Google Crome-Browser all working fine.

In Opera 10, I can select a file from harddisk or network-share and confirm it. Then in Text-Field for displaying the path, it show "C:\fake_path\mydirectory\myfile.ext". When I submit the form, the file wasn't upload to server.

My users report, that the problem was new after I update to ExtJS3.0.0 . Durring I has use ExtJS2.3.x in opera working the upload-form correct.

What should I do now? B)
(At the moment, 2 users must use FF or IE to use my intranet-application)


Best greetings from (raining) germany
Matthias

Matthias_WB
15 Dec 2009, 12:43 PM
no body has a idea?

SimonSimCity
9 Jan 2010, 7:16 AM
It seems that this issue has nothing to do with ExtJS - because YouTube has the same problems :D

@look: http://www.google.com/support/forum/p/youtube/thread?tid=513dfdea52895ff2&hl=en

But this has nothing to do with the real upload ... the upload still works ...

ljadrbln
19 Jan 2010, 6:59 AM
Hello Matthias_WB,

This is the task of security.

Try to override component behaviour:

this.fileInput.on('change', function(){
var v = this.fileInput.dom.value;

//TODO: try to fix fakepath in IE and fake_path in Opera
var slashes_arr = v.split("/");
if(slashes_arr.length){
v = slashes_arr[slashes_arr.length-1];
}

var backslashes_arr = v.split("\\");
if(backslashes_arr.length){
v = backslashes_arr[backslashes_arr.length-1];
}

this.setValue(v);
this.fireEvent('fileselected', this, v);
}, this);

Matthias_WB
19 Jan 2010, 10:02 PM
Hallo ljadrbln,

how I must use you code? Must I replace lines in Ext.ux.form.FileUploadField.js ??? Or is it a statemant, that I write before Iam binding the Ext.ux.form.FileUploadField in Form?