[Zope-CMF] Uploading many files

Tres Seaver tseaver@palladion.com
Sat, 02 Jun 2001 13:42:05 -0400


Scott wrote:

> What's the best way to upload many files at once?  I have about one
> hundred images I'd like to add as portal images, complete with title,
> subject, etc.  Would it be to use ftp to dump the images and then some
> DTML to convert them from Images to Portal Images, or is there a better
> way?  Perhaps a python script?   I know very little DTML or python, so
> if anyone has some code snippets to do this, I would be appreciative.


For sites created under the latest CMF release, FTP / WebDAV / HTTP PUT
of images into a PortalFolder will result in the creation of Portal Image
objects;  you would still need to go in and set Title and other metadata.

Existing CMF Sites can take advantage of this feature by updating to the
CMF 1.1beta release (or CVS head) and creating a ContentTypeRegistry object
in the CMFSite;  then adding a "MIME-type" predicate which maps all 
"image/*"
types onto Portal Image.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org