[Zope-dev] Uploading an object's content via FTP

2002-07-05 Thread Gilles Lenfant

Hi,

I made a CMF portal_type class based on python product.
This contains a Photoshop file and some dedicated related services.
Users may upload Photoshop files via HTTP.
This works with small files but when a user uploads a big file (8 Mb and more) through 
HTTP, this stalls the server.

So I need to provide the user an alternate way to upload the object's content with an 
FTP client.

Where should I start to get this working ? Examples somewhere ?

How can I programmatically know the port number for Zope FTP ?

How can I catch "FTP upload complete" event ?

Thanks in advance.

--Gilles





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Copy without taking including the structure

2002-07-05 Thread Petter Enholm

Hi,

I am implementing a kind of Copy function which will strip off the sub level
of object being copied. The idea is to copy only the object marked for
copying - without the sub objects.
(For those interested: I use these objects as special kind of reference
objects  in my structure...)

In the new copy routine I have added these lines which avoids having the sub
level created:

[ ]

newObject = ob._getCopy(self)

for zob in newObject._objects:
   delattr(newObject, zob['id'])
newObject._objects = ()

[ . ]

self._setObject(newObject.id,newObject)   # add the object to the Zope
database

... delattr is the same method as used by _delOb, so I assumed this is the
safe way of doing it.
Can anyone tell me if this is not OK ? It seems to work very well 

Best regards

Petter Enholm
Snapper as
www.snapper.no






___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )