失去扩展时使用的FileReference下载 [英] Losing extension when use FileReference download

查看:112
本文介绍了失去扩展时使用的FileReference下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用户下载JPEG文件从我的应用程序,但是,当用户更改文件名保存的文件将不延长下载。

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

例如:我使用FileReference.download(),并设置不被显示的默认文件名是demoPic.jpg和用户的Windows系统设置控制文件扩展名。因此,当对话框打开下载窗口,只有demoPic显示为文件名。如果用户保存的文件而不改变文件名,保存的文件将被确定。但是,如果用户更改文件名,下载文件会被保存没有扩展名。是有可能的文件扩展名添加到文件名时,用户可以通过柔性code忘了呢?

For Example: I am using FileReference.download() and set the default filename as "demoPic.jpg" and user's windows system setting control file extension not being shown. So when the dialog opens a download window, only "demoPic" shown as the filename. If user saved file without changing filename, the saved file will be OK. But if user change file name, the download file will be saved without extension. is it possible to add file extension to filename when user forget it by flex code?

推荐答案

我有同样的问题,没能解决它到现在为止。现在看来,这是与Flash + Windows中的一个问题。 :(遗憾地通知,但我没有发现任何修补程序。

I have the same problem and was not able to fix it until now. It seems it is a problem with flash + windows. :( sorry to inform but I did not found any fix.

如果这可以称之为一个变通方法,就是以某种方式提醒用户,并要求他们也将延伸时,他们重命名文件。

If this can be called a workaround, is somehow to warn users and ask them to place also the extension when they rename the file.

这篇关于失去扩展时使用的FileReference下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆