1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #30422 -- Made TemporaryFileUploadHandler handle interrupted uploads.

This patch allows upload handlers to handle interrupted uploads.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
aryan
2020-02-20 00:23:48 +05:30
committed by Mariusz Felisiak
parent 21b127bfbc
commit 11c4a4412b
7 changed files with 71 additions and 4 deletions

View File

@@ -212,6 +212,13 @@ attributes:
Callback signaling that the entire upload (all files) has completed.
.. method:: FileUploadHandler.upload_interrupted()
.. versionadded:: 3.2
Callback signaling that the upload was interrupted, e.g. when the user
closed their browser during file upload.
.. method:: FileUploadHandler.handle_raw_input(input_data, META, content_length, boundary, encoding)
Allows the handler to completely override the parsing of the raw

View File

@@ -195,8 +195,9 @@ File Storage
File Uploads
~~~~~~~~~~~~
* ...
* The new :meth:`FileUploadHandler.upload_interrupted()
<django.core.files.uploadhandler.FileUploadHandler.upload_interrupted>`
callback allows handling interrupted uploads.
Forms
~~~~~