I am using FileReference.save to save a jpg to the user’s computer. In Windows 7, I pass in ‘test.jpg’ as the file name to be saved but only ‘test’ appears in the file save dialogue (‘test.jpg’ appears as the file name in Windows Vista). So, unless the user manually adds the .jpg extension, Windows 7 does not know it is a jpeg file since it is just being saved as ‘test’. I’d like to be able to pass the .jpg extension for the user but Windows 7 seems to be stripping the file extension from the file name that is passed to the file save dialogue.
fr = new FileReference();
fr.save(imgByteArray, 'test.jpg');
Alright so the issue is just that the OS is hiding the extensions from you. To fix it:
Alternative to steps 1 and 2 you can hit WinKey+E to get an explorer window.
Yay for technical writing 101.
When you do a save, browse, or download, action the dialog that’s opened is OS dependent and so is treated with settings applied to the OS by the user. If you’re in the context of AIR you can save directly without the dialogs using the FileStream class.