@@ -37,16 +37,24 @@ class FieldStorage:
3737 filename: the filename, if specified; otherwise None;
3838 this is the client side filename, *not* the file name on which
3939 it is stored (that's a temporary file you don't deal with)
40+
4041 value: the value as a *string*; for file uploads, this transparently
4142 reads the file every time you request the value and returns *bytes*
43+
4244 file: the file(-like) object from which you can read the data *as bytes*;
4345 None if the data is stored a simple string
46+
4447 type: the content-type, or None if not specified
48+
4549 type_options: dictionary of options specified on the content-type line
50+
4651 disposition: content-disposition, or None if not specified
52+
4753 disposition_options: dictionary of corresponding options
54+
4855 headers: a dictionary(-like) object (sometimes email.message.Message
4956 or a subclass thereof) containing *all* headers
57+
5058 The class can be subclassed, mostly for the purpose of overriding
5159 the make_file() method, which is called internally to come up with
5260 a file open for reading and writing. This makes it possible to
@@ -68,27 +76,36 @@ def __init__(self, fp=None, headers=None, outerboundary=b'',
6876 """Constructor. Read multipart/* until last part.
6977 Arguments, all optional:
7078 fp: file pointer; default: sys.stdin.buffer
79+
7180 Not used when the request method is GET.
7281 Can be a TextIOWrapper object or an object whose read() and readline()
7382 methods return bytes.
83+
7484 headers: header dictionary-like object;
7585 default: taken from environ as per CGI spec
86+
7687 outerboundary: terminating multipart boundary (for internal use only)
88+
7789 environ: environment dictionary; default: os.environ
90+
7891 keep_blank_values: flag indicating whether blank values in
7992 percent-encoded forms should be treated as blank strings.
8093 A true value indicates that blanks should be retained as blank strings.
8194 The default false value indicates that blank values are to be ignored
8295 and treated as if they were not included.
96+
8397 strict_parsing: flag indicating what to do with parsing errors.
8498 If false (the default), errors are silently ignored.
8599 If true, errors raise a ValueError exception.
100+
86101 limit: used internally to read parts of multipart/form-data forms,
87102 to exit from the reading loop when reached. It is the difference
88- between the form content-length and the number of bytes already read
103+ between the form content-length and the number of bytes already read.
104+
89105 encoding, errors: the encoding and error handler used to decode the
90106 binary stream to strings. Must be the same as the charset defined for
91107 the page sending the form (content-type : meta http-equiv or header)
108+
92109 max_num_fields: int. If set, then __init__ throws a ValueError if
93110 there are more than n fields read by parse_qsl().
94111 """
0 commit comments