[Zope] Batch upload to FileLibrary?

J Cameron Cooper jccooper@jcameroncooper.com
Fri, 09 May 2003 17:17:19 -0500


>
>
>My insitute want a simple File share server to
>exchange file between us. I play with the examples
>FileLibrary in zope2.6 these days. And suggest to add
>some keyword or abstract features in FileLibrary will
>make it a good candidate :)
>
That's an example application, although I don't think there's anything
specific to discommend it if it works for you.

There are others available. Try searching Zope.org's products listing:
there are several document management/file library systems.

And of course Plone/CMF.

>I try to write a python client(not web interface) to
>upload and download some files in batch. By search on
>google and python manual, i think it is something to
>do with httplib. There is a simple demo in python doc
>of the usage of "POST" method. 
>  
>
There is a script called site_load.py or some such that comes with Zope
that does this using the Zope.app method.

If you really want to use httplib, you have to make the value of one of
the parameters you send the contents of the file you want to upload,
which is probably just as simple as dumping the contents into it. Then
treat that parameter as a file on the Zope end and you should be set.
(You might try to name the parameter 'name:file' to suggest a type.)

If that doesn't work, people on the Python groups/lists should be able
to be more helpful as to the use of httplib. Also check zopelabs.com for
recipies.

--jcc