1

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

}
tshepang
  • 12,111
  • 21
  • 91
  • 136
dt1000
  • 3,684
  • 6
  • 43
  • 65

1 Answers1

1

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

Christophe Herreman
  • 15,895
  • 9
  • 58
  • 86