nathancolgate / s3-swf-upload-plugin

A rails 3 gem which allow user upload files to S3 through an embedded flash directly. All UI has been moved out of flex and can be controlled by CSS and JavaScript callbacks.
http://www.nathancolgate.com
MIT License
317 stars 74 forks source link

Clicking browse and selecting files gives flash error message #6

Closed devth closed 14 years ago

devth commented 14 years ago

Flash 10.0.4

TypeError: Error 1009: Cannot access a property or method of a null object reference.
    at S3Uploader/addFile()
    at S3Uploader/selectFileHandler()

Tested on Safari 4, Chrome 5 and Firefox 3.5.9 with all 3 browsers giving the same error. Tested on both my localhost app and on the demo at http://s3swfuploader.heroku.com/

devth commented 14 years ago

I installed Flash 10,1,81,24 and now it just doesn't work at all. No errors, no javascript notifications.

devth commented 14 years ago

Reinstalled flash 10.1 using debug player and get this error and no working functionality:

Error: Error 2014: Feature is not available at this time.
at flash.net::FileReference/get data()
at flash.external::ExternalInterface$/_objectToJS()
at flash.external::ExternalInterface$/_toJS()
at flash.external::ExternalInterface$/_arrayToJS()
at flash.external::ExternalInterface$/_toJS()
at flash.external::ExternalInterface$/_objectToJS()
at flash.external::ExternalInterface$/_toJS()
at flash.external::ExternalInterface$/call()
at com.nathancolgate.s3_swf_upload::S3Queue/changeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.collections::ListCollectionView/dispatchEvent()
at mx.collections::ListCollectionView/addItemsToView()
at mx.collections::ListCollectionView/listChangeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.collections::ArrayList/internalDispatchEvent()
at mx.collections::ArrayList/addItemAt()
at mx.collections::ListCollectionView/addItemAt()
at mx.collections::ListCollectionView/addItem()
at S3Uploader/addFile()
at S3Uploader/selectFileHandler()
dan-79 commented 14 years ago

Any fix for the Flash 10.1 bug?

nathancolgate commented 14 years ago

Good news. Wrapped up some stuff early and was able to tackle this tonight. The deal: Flash Player 10.1 did not allow ExternalInterface to pass a FileReference object to Javascript. So I added a toJavascript function that converts FileReference into simple Objects. You pretty much get the same attributes (name, size, type). Hopefully this will survive any future releases!

If you get a chance, update to 0.3.0 and give it a test (I'll update the demo site later this weekend) and if you like it, buy me a beer (which actually means: help me pad my entertainment budget so I can take my wife out to dinner and help validate the hours spent working on this stuff)

devth commented 14 years ago

I'm finally back and am planning to test this out again! Look forward to a beer or two from me :)

wiemann commented 14 years ago

Firefox 3.6.12 on Mac still gives me that error, so the plugin is broken in production right now! Any developments here?

nathancolgate commented 14 years ago

Not sure what to tell 'ya. I'm running FF 3.6.12 on Mac and the demo site (http://s3swfuploader.heroku.com/) runs fine for me. My flash version is 10,1,82,76 according to http://www.adobe.com/swf/software/flash/about/flashAbout_info_small.swf.

Are you having trouble with the demo production site or your own production site?

wiemann commented 14 years ago

I'm running Flash 10,1,85,3 debugger. You think that's the issue? The demo site also gives me the error.

nathancolgate commented 14 years ago

Must be. Sorry about that.

wiemann commented 14 years ago

I guess it's more Adobe's fault. The debugging player ain't the best piece of software I've come across. Thanks for replying so quickly.