> print "MIME-type: %s" % cpg.request.fileTypeMap['file1'].

just an update for those good people that search the archives for
answers... With CherryPy 2.2 there is a new way to determine the
mime-type of an uploaded file...

    def upload(self, myFile):
        return dict(mimetype=myFile.type)


I found this while reading part of a CherryPy tutorial:
http://svn.cherrypy.org/trunk/cherrypy/tutorial/tut09_files.py


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to