File Uploader – Week 4
I am quite a bit farther than I expected to be at this time – in fact, I am where I planned to be around the week of July 6th. I started coding early to compensate for some summer plans, and that turned out to be a great thing as I found out this past week that I will be required to take summer classes at UT Dallas. Many of my existing summer plans have been canceled and I’ll now have schoolwork as a priority, so it’s great to be so far ahead my more limited schedule for GSoC.
Here’s what I’ve completed so far:
- I have a copy of WP committed to the GSoC repository
- The existing swfupload code has been removed
- The old uploader has been replaced by Plupload
- Uploading is functional with HTML5, Flash, and HTML4 runtimes (after talking with azaozz, we decided that the Gears, Silverlight, and BrowserPlus runtimes were not worth supporting)
- Drag and drop uploading has been enabled with the root div as the receiver (so you can drag and drop to any part of the page in the uploader screen) and is functional
- The switch between “flash” and “browser” uploaders has been removed (after talking with azaozz) as Plupload will choose HTML5, Flash, or browser modes based on what’s supported
- The old “browser uploader” has been repurposed as the noscript version (by adding the “hide-if-no-js” class)
- The hide-if-no-js class (and JS detection scripts) were added to the wp_iframe function (http://core.trac.wordpress.org/ticket/17473) and were committed in changeset #17971 (http://core.trac.wordpress.org/changeset/17971) – this allowed the no-js uploader to be properly hidden in the add media popup in the same way it was hidden in the add media page
- As per a request from azaozz, a checkbox requesting that images be resized to the large image size (by default 1024×1024) at upload time was added – the Plupload runtime resizes the image client-side if it can and the backend PHP catches the image if it can’t
- EXIF tags are preserved if a resize takes place
- The uploader has been tested in FF4 and has been less extensively tested in FF3, Chrome 13, IE8, and IE9
- Full list of code changes – http://gsoc.trac.wordpress.org/log/2011/jacobwg
In addition, I updated the repository this week with the latest changes from trunk WordPress and added my uploader upgrades back it.
Next, I’ll be testing my code in more browsers / OSs, looking into pre-upload file processing hooks (for plugins), and getting together with the UI team for some of the UI changes. I’ll also be adding tickets to Trac for each of the features of the uploader to help facilitate further testing/review/development.
I’ll have to second @croncobaurul – distraction-free mode is pretty neat!