I'm using FileReference to open a file, but I can only get the file name that the user selected, not the full path. Can I get the complete file path, or is there a security issue? Or should I use another approach?
private function openClicked(e:MouseEvent):void {
var fr:FileReference = new FileReference();
fr.browse();
fr.addEventListener(Event.SELECT , fileSelected);
}
private function fileSelected(e:Event){
trace ("file sel "开发者_运维知识库 + e.target.name);
//do stuff
}
The FileReference class does not allow that. You'll need to use the File class instead.
精彩评论