In flex when I allow user to download a file using : dwFile = new FileReference(); dwFile.download(downloadURL, dwFileName); Is there a way to ensure that the downloaded file always ends up with the extension .tar or any other extension for that matter? By default I give it a name like xyz.tar, but as of now the user can tamper with filename, including its extension. Can I prevent him from doing so?
views:
232answers:
1
A:
why not eliminate the ability to modify the extension and make it only the file name....
dwFile.download( downloadURL, StringUtil.substitute("{0}.tar", dwFileName) );
Shua
2009-07-28 18:36:40
tried this. doesn't make any difference at all. In the download dialog box, filename is still shown as xyz.tar, and I can still tamper with the extension.
dta
2009-07-29 05:46:10
oooohhh I know what you mean now.... yea I don't think there is anything you can do about that.
Shua
2009-07-29 13:19:20