Logo Search packages:      
Sourcecode: zope-photo version File versions

def zope-photo-1.2.3::Photo::Photo::PUT (   self,
  REQUEST,
  RESPONSE 
)

Handle HTTP PUT requests.

Definition at line 451 of file Photo.py.

00451                                     :
        """Handle HTTP PUT requests."""
        self.dav__init(REQUEST, RESPONSE)
        if hasattr(self, 'dav__simpleifhandler'):
            self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
        file=REQUEST['BODYFILE']
        
        if hasattr(self, '_original'):
            # Updating existing Photo
            self._original.manage_upload(file, self.content_type())
            if self._validImage():
                self._makeDisplayPhotos()
        else:
            # Adding a new Photo.
            # At this point, the object is not yet in its final context.
            # Since ExtImage needs to know the URL of the new Photo object
            # so it can determine where to create new files, we store
            # the image data and let manage_afterAdd() generate the displays
            # once the Photo is in its final context.
            self._data = file.read()
            
        RESPONSE.setStatus(204)
        return RESPONSE

    security.declareProtected('FTP access', 'manage_FTPget', 'manage_FTPstat', 'manage_FTPlist')
    def manage_FTPget(self):


Generated by  Doxygen 1.6.0   Back to index