Dhana
Dhana

Reputation: 189

Flash player 10 Filereference.save and file extensions

I'm using Filereference.save() to save a XML file. It's working fine with default filename.But is there a way to force a file extension on the saved file? I'm using "untitled.xml" as the default filename, but if the user changes it to say "myfile", it gets saved as "myfile", rather than "myfile.xml".

Upvotes: 3

Views: 2172

Answers (1)

back2dos
back2dos

Reputation: 15623

No, you can't. For loading, you can use type filters, but for writing you cannot.

One reason may be security. Many users use the default view of icons in windows, which omits extensions. Thus you could save "myfile.xml.exe" and put malicious binary code into it. But I am just guessing.

greetz
back2dos

Upvotes: 2

Related Questions