Flash 10’s change in security regarding the FileReference.browse
broke SWFUpload. The details of the security changes are here.
I’ve made some minor changes to the code to allow SWFUpload to work with Flash 10 (and continue to work with Flash 9). I accomplish this by creating a transparent Flash overlay to sit atop an HTML element (e.g. a browse button). When the user clicks the HTML element, they’re really clicking the Flash overlay. I’ve reworked swfupload.swf so it’s one giant transparent button, and when that button is clicked it brings up the file browse dialog. After that it’s business as usual.
You’ll need to make a few changes to get this version working with what you’ve already got set up.
- Get the updated swfupload.swf and swfupload.js files.
- Create a
div
and position it directly over your browse button or link. This div will contain the transparent Flash overlay. - Add a
flash_container_id
setting. This should be set to the id of thediv
element in step 2.
You can check out an example of this in action in the /samples/demos/flash10
directory.
To simplify things for myself, I ripped out all code that was in the works for the Flash button solution.
If you’re from the SWFUpload team and want some help integrating this, or if you want me to remove the code from this repository, just let me know. I’m happy to do either.