mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #22680 -- I/O operation on closed file.
This patch is two-fold; first it ensure that Django does close everything in request.FILES at the end of the request and secondly the storage system should no longer close any files during save, it's up to the caller to handle that -- or let Django close the files at the end of the request.
This commit is contained in:
parent
a1c6cd6a16
commit
e2efc8965e
10 changed files with 79 additions and 6 deletions
|
@ -157,3 +157,9 @@ def file_upload_content_type_extra(request):
|
|||
(k, smart_str(v)) for k, v in uploadedfile.content_type_extra.items()
|
||||
])
|
||||
return HttpResponse(json.dumps(params))
|
||||
|
||||
|
||||
def file_upload_fd_closing(request, access):
|
||||
if access == 't':
|
||||
request.FILES # Trigger file parsing.
|
||||
return HttpResponse('')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue