To install it in your buildout, just add ‘collective.quickupload’ to your egg list, then:
To install it in Plone, use the Addons control panel, select “Plone Quick Upload” Product and install it.
To see it in action, just assign the Quick Upload portlet somewhere in your site and test it.
This package contains:
A simple ajax view that can be called by any plone template.
Flashupload (jquery.uploadify) is more user friendly under MSIE, but has some “big” problems:
the webmaster has the choice between these 2 solutions (see control panel below).
the upload form can be viewed only with permission CMF.AddPortalContent on context
the upload form can be viewed only for objects providing IQuickUploadCapable, by default ATFolder, ATBTreeFolder and Plone Site are implementing IQuickUploadCapable
the quickupload form allows to fill title and description for each uploaded file (see control panel below)
the quickupload view log and returns errors to the form (unauthorized, id always exist, type not allowed, etc … )
the view can use some attributes set in session or request:
force mediatype (could be None, image, video, audio, or something like this ‘.pdf;.doc;’)
if a mediatype is set in request :
with fileuploader.js an error is raised in the form when a file content-type selected is not correct.
if portal_type is not set in request, content_type_registry is used to find the good portal_type, otherwise the “File” portal_type will be used.
a basic Plone Control panel with some options:
Plone 4.0 support stopped with 1.6.0, Plone 3.3.x support stopped with 1.0.3.
These ameliorations have been done:
How to add the quickupload view in my own template or viewlet?
Just look the quickupload portlet code, it’s really easy.
You can also take a look at collective.plonefinder product http://plone.org/products/collective.plonefinder which requires collective.quickupload.
How to set by code types where upload is allowed ?
You include minimal.zcml only, adding to your product configure.zcml:
<exclude package="collective.quickupload" file="configure.zcml" /> <include package="collective.quickupload" file="minimal.zcml" />
And you implement IUploadCapable on types you want:
<class class=".content.EPRIVR_Documents.EPRIVR_Domain"> <implements interface="collective.quickupload.browser.interfaces.IQuickUploadCapable" /> </class>
How to exclude upload on some types ?
If a type implements IQuickUploadNotCapable, portlet will never be shown on it. Add to your zcml:
<class class=".content.MyContent"> <implements interface="collective.quickupload.browser.interfaces.IQuickUploadNotCapable" /> </class>
Please file all tickets to issue page on github https://github.com/collective/collective.quickupload/issues.
Jean-mat Grimaldi http://macadames.wordpress.com
Thanks to :