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

def zope-extfile-1.4.2::ExtImage::ExtImage::manage_del_prev (   self,
  REQUEST = None 

Delete the Preview Image 

Definition at line 268 of file ExtImage.py.

00268                                            :
        """ Delete the Preview Image """
        if self.has_preview and self.filename != self.prev_filename:
            tmp_fn = self._temp_fsname(self.prev_filename)
            fn = self._fsname(self.prev_filename)
            if isfile(tmp_fn):
                try: os.rename(tmp_fn, fn+'.undo')
                except OSError: pass
                    try: os.remove(fn)
                    except OSError: pass
            elif isfile(fn):
                try: os.rename(fn, fn+'.undo')
                except OSError: pass
        self.prev_content_type = ''
        self.has_preview = 0
        if REQUEST is not None:
            return self.manage_main(self, REQUEST, manage_tabs_message='Preview deleted.')
    security.declareProtected(ChangePermission, 'manage_create_prev')
    def manage_create_prev(self, maxx=0, maxy=0, ratio=0, REQUEST=None):

Generated by  Doxygen 1.6.0   Back to index