Skip to content
MCF edited this page Sep 14, 2010 · 27 revisions

FileUpload Versions.

A change to the event capture was introduced after the release of Cappuccino version 0.8 that broke some of the functionality of the original FileUpload gist code. The relevant commit actually took place during 0.8.0 development but was reverted temporarily for the 0.8.1 release. So you should choose the appropriate version of FileUpload to match the version of Cappuccino being used.

FileUpload has several branches to support the different version of Cappuccino:

single_file_for_0.8.1 – supports single file uploads for version 0.8.1 of Cappuccino (and 0.7.1 for that matter).
single_file_for_latest – supports single file uploads for the latest development release of Cappuccino

The current master branch works with the latest development release of Cappuccino (i.e. post 0.8.1). It also has some support for the new multiple file upload features found in html5. Some of the class methods have changed as a result – wherever selection was returned as a CPString before, it is now returned as a CPArray instead.

Browser Compatibility

The three branches have been tested with the following browsers:

single_file_for_0.8.1 branch

Firefox 3.5
Firefox 3.6
Safari 4.0
Chrome 4.1
Internet Explorer 6.0 (you will have to comment out the console.log calls in the test App)
Internet Explorer 7.0 (you will have to comment out the console.log calls in the test App)
Internet Explorer 8.0 (you will have to comment out the console.log calls in the test App)

single_file_for_latest branch

Firefox 3.5
Firefox 3.6
Safari 4.0
Chrome 4.1
Internet Explorer 7.0 (you will have to comment out the console.log calls in the test App)
Internet Explorer 8.0 (you will have to comment out the console.log calls in the test App)

Master branch

Firefox 3.5 (multiple file upload not supported)
Firefox 3.6
Safari 4.0
Safari 5.0
Chrome 4.1
Chrome 5.0
Chrome 6.0
Internet Explorer 7.0 (multiple file upload not supported)
Internet Explorer 8.0 (multiple file upload not supported)
Opera 10.62 (multiple file upload not supported)

A Note About Opera

With Opera the upload always works, however the server response is not always received and/or read by the UploadButton object. It’s unclear why this does not always work – however if it does work in your application it seems that it will always work. I think this may be running afoul of an bug in Opera involving JavaScript and threading.

Additional Information

There is a feature request for a File Upload button in Cappuccino here:

http://github.com/280north/cappuccino/issues#issue/79
(or the original here: http://cappuccino.lighthouseapp.com/projects/16499/tickets/121-need-for-a-cpopenpanel )

There are a number of mailing list discussions on the topic (or related to it) as well:

http://groups.google.com/group/objectivej/browse_thread/thread/e02f83870a9230d1
http://groups.google.com/group/objectivej/browse_thread/thread/253e92f8a4b10019
http://groups.google.com/group/objectivej/browse_thread/thread/e815409311779d0d

http://groups.google.com/group/objectivej-dev/browse_thread/thread/92e9ddade1b11b65

Clone this wiki locally