]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add more documentation for request.files.
authorBen Darnell <ben@bendarnell.com>
Sat, 4 Sep 2010 19:19:46 +0000 (12:19 -0700)
committerBen Darnell <ben@bendarnell.com>
Sat, 4 Sep 2010 19:19:46 +0000 (12:19 -0700)
website/templates/documentation.txt

index 9f2171e435521b040192af2093a8a75933bc5a9a..357c63bcdf6b9dda2e1d982cd1c35348c34af0d2 100644 (file)
@@ -154,6 +154,11 @@ You can get query string arguments and parse `POST` bodies with the
             self.set_header("Content-Type", "text/plain")
             self.write("You wrote " + self.get_argument("message"))
 
+Uploaded files are available in `self.request.files`, which maps names
+(the name of the HTML `<input type="file">` element) to a list of
+files. Each file is a dictionary of the form `{"filename":...,
+"content_type":..., "body":...}`.
+
 If you want to send an error response to the client, e.g., 403 Unauthorized,
 you can just raise a `tornado.web.HTTPError` exception: