0

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?

4

1 回答 1

0

为什么不消除修改扩展名并使其仅是文件名的能力....

dwFile.download( downloadURL, StringUtil.substitute("{0}.tar", dwFileName) );
于 2009-07-28T18:36:40.623 回答