z3c.form widget for adding multiple files
Project description
Introduction
plone.formwidget.multifile is a z3c.form-widget which lets users upload multiple files, either at once, or in batches using repeated form submissions.
Browsers that do not implement the file input “multiple” attribute are supported via javascript adding of multiple file inputs. This also works with browsers that do support “multiple”, and allows users to add and remove files in bundles. Upload does not occur until the form is saved.
Usage
Using the widget is quiet easy:
>>> from plone.directives import form as directivesform >>> from plone.formwidget.multifile import MultiFileFieldWidget >>> from plone.namedfile.field import NamedFile >>> from zope import schema >>> from zope.interface import Interface >>> >>> class IMySchema(Interface): ... """My schema interface""" ... ... directivesform.widget(files=MultiFileFieldWidget) ... files = schema.List(title=u'Files', ... value_type=NamedFile())
Limitations
We do not yet support ordering. There is no fallback for non-html5, non-javascript browsers. They will only be able to upload 1 file at a time.
Changelog
1.0a2 (2012-12-20)
Removed integration with jQuery plugin. Instead we use HTML and javascript, and when applicable, the “multiple” extension from HTML5 which lets a user upload multiple files at once. [tmog]
Fix minor bugs on the new non-flash implementation. [rafaelbco]
Removed dependency on plone.app.drafts. [rafaelbco]
1.0a1 (2011-09-13)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for plone.formwidget.multifile-1.0a2.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0873ef4831d847ea75b17823297e66536379a8debec743581a8d1c780eb3247 |
|
MD5 | d042c6a00073549fb06a3f39053eff3d |
|
BLAKE2b-256 | 4129338fb3fa9ff4db47159cab12c538a28121af0cf3d906c0cee7f6aedc63a2 |