Flash Player 10 Filereference.save and File Extensions

I am using Filereference.save () to save an XML file. It works fine with the default file name. But is there a way to force a file extension in a saved file? I use "untitled.xml" as the default file name, but if the user changes it to say "myfile", it is saved as "myfile", not "myfile.xml".

+3
source share
1 answer

No, you can’t. You can use type filters for loading, but you cannot write.

One reason may be security. Many users use the default window icon view, which skips extensions. This way you can save "myfile.xml.exe" and put malicious binary in it. But I just guess.

Greetz
back2dos

+2
source

Source: https://habr.com/ru/post/1749003/


All Articles