File uploads parsed from an `url-encoded` or `multipart/form-data` encoded POST or PUT request body. The values are instances of :class:`cgi.FieldStorage`. The most important attributes are: filename The filename, if specified; otherwise None; th
(self)
| 943 | |
| 944 | @DictProperty('environ', 'bottle.request.files', read_only=True) |
| 945 | def files(self): |
| 946 | """ File uploads parsed from an `url-encoded` or `multipart/form-data` |
| 947 | encoded POST or PUT request body. The values are instances of |
| 948 | :class:`cgi.FieldStorage`. The most important attributes are: |
| 949 | |
| 950 | filename |
| 951 | The filename, if specified; otherwise None; this is the client |
| 952 | side filename, *not* the file name on which it is stored (that's |
| 953 | a temporary file you don't deal with) |
| 954 | file |
| 955 | The file(-like) object from which you can read the data. |
| 956 | value |
| 957 | The value as a *string*; for file uploads, this transparently |
| 958 | reads the file every time you request the value. Do not do this |
| 959 | on big files. |
| 960 | """ |
| 961 | files = FormsDict() |
| 962 | for name, item in self.POST.iterallitems(): |
| 963 | if hasattr(item, 'filename'): |
| 964 | files[name] = item |
| 965 | return files |
| 966 | |
| 967 | @DictProperty('environ', 'bottle.request.json', read_only=True) |
| 968 | def json(self): |
no test coverage detected