import OFS.DTMLDocument
import Products.BlogFace.Entries.STXDocumentEntry

#eh?  no self called even when set on a folder?
#def PUT_factory( self, name, typ, body ):
def PUT_factory(name, typ, body ):
    """
    Hook PUT creation to make objects of the right type when
    new item uploaded via FTP/WebDAV.
    """
    #if typ is None:
    #    typ, enc = OFS.content_types.guess_content_type()
    #if typ == 'text/x-python':
    #    return PythonScript( name )
    #if typ[ :4 ] == 'text':
    #    return DTMLMethod( '', __name__=name )
    #return None # take the default, then
    return Products.BlogFace.Entries.STXDocumentEntry.STXDocumentEntry(name)
