开发者

Air app, get full path when opening file with FIleReference

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜