[Zope] need help implementing ftp_get et all

Robert Rottermann robert@redcor.ch
Thu, 11 Oct 2001 11:54:39 +0200


Hi there,
I try to implement a webdav interface to the Photo product.

I can get a photo (which is named like 'abc.jpg') trough dreamweavers WebDAV
interface. I always could do that, even before my "improvements".
However I can not put the files back.
I did add a print statement to the two functions I added. They never produce
any output.

What am I doing wrongly?

Robert

This are the two functions I added:

        def manage_FTPget(self):
            "Returns file for FTP"
            print 'in  manage_FTPget'
            return self.read()

        def put ( self, REQUEST, RESPONSE):
            """
            Implement WebDAV/HTTP PUT/FTP put method for this object.
            """
            print 'in put'
            self.dav__init(REQUEST, RESPONSE)
            self.dav__simpleifhandler(REQUEST, RESPONSE)
            type=REQUEST.get_header('content-type', None)

            file=REQUEST['BODYFILE']
            self.manage_editPhoto(file)

            #data, size = self._read_data(file)
            #content_type=self._get_content_type(file, data, self.__name__,
            #                                    type or self.content_type)
            #self.update_data(data, content_type, size)

            RESPONSE.setStatus(204)
            return RESPONSE