class documentation
class FileUploadParser(BaseParser): (source)
Parser for file upload data.
Method | get |
Detects the uploaded file name. First searches a 'filename' url kwarg. Then tries to parse Content-Disposition header. |
Method | parse |
Treats the incoming bytestream as a raw file upload and returns a `DataAndFiles` object. |
Class Variable | errors |
Undocumented |
Class Variable | media |
Undocumented |
Detects the uploaded file name. First searches a 'filename' url kwarg. Then tries to parse Content-Disposition header.
overrides
rest_framework.parsers.BaseParser.parse
Treats the incoming bytestream as a raw file upload and returns a `DataAndFiles` object. `.data` will be None (we expect request body to be a file content). `.files` will be a `QueryDict` containing one 'file' element.