Yesterday when I posted about Flash in Gmail I didn’t mentioned what the problem was. Here is my assumption on what the problem was and what could have caused that problem.

On the help page, it was mentioned that attachment functionality required Flash player 8 or greater, and if you have Flash player 10 installed then set the option for normal attachment in the settings. I have Flash player 10 installed, so I opted for basic attachment option in settings and attached the files.

So the question is, why it didn’t worked with Flash player 10?

Because of a new security enhancements in Flash player 10.  In previous versions of the Flash Player, you could pro programmatically call the FileReference.browse() method to open a file browser dialog window which enabled users to locate a file on their system so that it could be uploaded to a server. In Flash Player 10 you can no longer spawn this dialog window programmatically and it must be initiated by a user click. you can read more about this here on Lee’s blog. To overcome this issue either create the HTML upload button in Flash rather than HTML or  overlay a transparent SWF button over the HTML content.

So I assume that in Gmail, “attach a file”button was in HTM and it was invoking browse method dynamically within a hidden swf object, which was throwing exception. I said Gmail was using.. because when in the evening when I went back to check the error, I set the settings to advanced and clicked on attach a file it didn’t gave me any error, and when I checked, attach a file button was in Flash. So I assume that they have placed the button within swf or they have overlayed the swf over the button.

One Response to “File upload and Flash Player 10 issue”

  1. Gmail uses Flash for better user experience Says:

    […] Update: I have posted more details here […]

Leave a Reply