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

def zope-extfile-1.4.2::ExtFile::ExtFile::manage_upload (   self,
  file = '',
  content_type = '',
  REQUEST = None 
)

Upload file from file handle or string buffer 

Definition at line 398 of file ExtFile.py.

00398                                                                    :
        """ Upload file from file handle or string buffer """
        if self.wl_isLocked():
            raise ResourceLockedError, "File is locked via WebDAV"
                            
        if type(file) == types.StringType:
            temp_file = TemporaryFile()
            temp_file.write(file)
            temp_file.seek(0)
        return self.manage_file_upload(temp_file, content_type, REQUEST)

    security.declareProtected(ChangePermission, 'manage_file_upload')
    def manage_file_upload(self, file='', content_type='', REQUEST=None):


Generated by  Doxygen 1.6.0   Back to index