1. cherrypy
  2. CherryPy

Source

CherryPy / tutorial / tut09_files.py

The branch 'cherrypy' does not exist.
Diff from to

File tutorial/tut09_files.py

  • Ignore whitespace
 Use cherrypy.lib.static.serve_file for that; it takes four
 arguments:
 
-serve_file(path, contentType=None, disposition=None, name=None)
+serve_file(path, content_type=None, disposition=None, name=None)
 
 Set "name" to the filename that you expect clients to use when they save
 your file. Note that the "name" argument is ignored if you don't also
 provide a "disposition" (usually "attachement"). You can manually set
-"contentType", but be aware that if you also use the encoding tool, it
+"content_type", but be aware that if you also use the encoding tool, it
 may choke if the file extension is not recognized as belonging to a known
-Content-Type. Setting the contentType to "application/x-download" works
+Content-Type. Setting the content_type to "application/x-download" works
 in most cases, and should prompt the user with an Open/Save dialog in
 popular browsers.