utils.guess_filename fails if the given parameter looks like a file object but has a non-string name attribute

A cherrypy uploaded file behave like a regular file, except that its name attribute is an int and passing it directly to requests fails because of that