-
Uploading
last modified July 21, 2007 by myktra
Uploading team page at the p4a sprint.
Overview
Plone Flash Upload is a Plone add-on product, associated with the Plone4Artists product suite, which adds an upload tab to folders that takes the user to an upload form. This upload form uses a Flash applet to provide the ability to upload multiple files simultaneously.
The concepts here dovetail with some of the work that fellow sprinters David Ray and Brent Lambert have done with ZipFileTransport. This product uses the standard AT FileWidget to upload ZIP files to Plone; ZFT then decompresses the archive and creates instances of content types that represent the contents of the archive. ZFT has the same usability limitations when it comes to uploading large files.
Objectives
Objectives for the sprint include:
- Review use cases/stories for PFU.
- Review the bug list and see if we can fix any issues.
- Test and log new issues.
- Determine if/how we can leverage PFU for uploading content to other
AT-based content types. The classic example for this is when a user
wants to upload a large file to a custom AT-based content type via a FileWidget. Initial feedback from the p4a team indicates this may be very difficult to do.
If there is anyone interested in working on the project, please let Mike or Rocky know. We can connect you with clients who are willing to fund your efforts!
Progress
Issues
p4a.PloneFlashUpload #16 - Upload button disappears (opera/firefox) - root cause
identified, possible solution suggested, need to review with the
project leaders to determine if the fix makes sense. Update: solution reviewed, approved and checked in.
p4a.PloneFlashUpload #18 - Uploading a file that already exists generates a vague error message - root cause identified (not checking for prior existence of the file in the area we're uploading to). We are working on a comprehensive solution to this problem and expect to have a check-in shortly.
Roadmap
The team feels that SWFUpload, an open source and generic Flash+JavaScript library, might be a better long term option. It might require us to make it work again in Zope, but long term it appears to be simpler and more powerful - most importantly, it allows you to select things and then upload them in a separate transaction. Benefits (from the SWFUpload site):
- Upload multiple files at once by ctrl/shift-selecting in dialog
- Javascript callbacks on all events
- Get file information before upload starts*
- Style upload elements with XHTML and css*
- Display information while files are uploading using HTML*
- No page reloads necessary*
- Works on all platforms/browsers that have Flash support.
- Degrades gracefully to normal HTML upload form if Flash or javascript is unavailable
- Control filesize before upload starts*
- Only display chosen filetypes in dialog
- Queue uploads, remove/add files before starting upload*
* - features not currently (or easily) provided by PloneFlashUpload with z3c.widget.FlashUpload
Status: we currently have the basic UI wired up - running in parallel with the z3c.widget.FlashUpload; and we have been able to get the basic Zope plumbing connected so the server accepts the upload. The nice thing about SWFUpload is that it does not impose its Flash UI on the user; it allows you to write that in HTML and CSS. Only current major limitation is adjusting the ticketing scheme in order to support multiple-file uploads. A more current version of SWFUpload that makes this easy to do was found here. This version has been updated recently and has additional features that turn out to be essential in order to allocate a separate ticket for each file it uploads. The good news is that we have proven that we can request the ticket outside of the Flash applet session and can supply the ticket ID inside the applet session (this is fully baked into z3c.widget.FlashUpload - not fun, and we have not yet found a reason why this was essential).
We will likely branch PFU and swap out the z3c widget for SWFUpload...and then perhaps target a future release to integrate back into trunk.