You are not logged in Log in Join
You are here: Home » Members » Stefan's Home » Patches for exUserFolder, ... » PUT_factory.py » View File

Log in
Name

Password

 

PUT_factory.py

File details
Size
1 K
File type
text/plain

File contents

# make this an external method

from Products.ExtFile.ExtImage import ExtImage
import string

def PUT_factory(self, name, typ, body):
        '''create ExtImage instead of plain Image'''
        major, minor = string.split(typ, '/')
        if major == 'image':
                return ExtImage(name, '', '')
        return None