日期:2014-05-16  浏览次数:20867 次

c:\fakepath
  我在做一个上传功能,选择后路径是c:\fakepath,我是extjs写的.怎么用代码解决.
fileUpload: true,
frame : true,
border : false,
style : 'padding-left:30px;',
items : [{
layout : 'column',

defaults : {
border : false
},
items:[{
    columnWidth : .99,
layout : 'form',
labelWidth : 35,
defaults : {
anchor : '97%',
msgTarget : 'qtip'
},
items : [{
xtype : 'fileuploadfield',
fieldLabel : "附件",
name : "attachment",
id:'attachment_id',
         false:true,
buttonText:'添加文件',
readOnly:true
}]
}]}]

------解决方案--------------------
安全设置的问题。可以使用range对象获取

参考
javascript获取file控件全路径