Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: jmehring-drafts

This branch is 41 commits ahead and 73 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 plone
Octocat-spinner-32 IGNORE.txt
Octocat-spinner-32 README.txt
Octocat-spinner-32 setup.py
README.txt
Introduction
============

`plone.formwidget.multifile` is a z3c.form-widget based on jQuery 
`uploadify <http://www.uploadify.com>`_ plugin, which uses flash for 
uploading.

Using flash makes it possible to select multiple files at once in the file
selection dialog provided by the browser / operating system. After selecting
the files the flash plugin will upload each file by once and the files are
then stored in a draft
(`plone.app.drafts <http://pypi.python.org/pypi/plone.app.drafts>`_). When
submitting the form the converter will get the files from the drafts storage.


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
-----------

Since the flash plugin submits the files it's not possible to use it with
HTTP basic authentication. Currently the widget passes the __ac cookie to
the flash plugin for authentication.
Something went wrong with that request. Please try again.