Air app, get full path when opening file with FIleReference

1k views Asked by At

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

}
1

There are 1 answers

0
Christophe Herreman On BEST ANSWER

The FileReference class does not allow that. You'll need to use the File class instead.