Losing extension when use FileReference download

后端 未结 4 753
醉酒成梦
醉酒成梦 2021-01-18 13:28

I need user download JPEG file from my app, however, when user change the file name the saved file will be downloaded without extension.

For Example: I am using File

4条回答
  •  旧时难觅i
    2021-01-18 14:13

    you just need to use navigateToUrl(ur)

    var ur:URLRequest=new URLRequest();
    var fr:FileReference=new FileReference();
    fr.download(ur,);
    

    "download" method call fileBrowser and then call servlet . then flex can't catch file extension

    but "navigateToUrl" called servlet first then servlet call fileBrowser then html can catch file extension

提交回复
热议问题