mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
This commit is contained in:
parent
21f13ff5b3
commit
500532c95d
32 changed files with 61 additions and 65 deletions
|
@ -97,7 +97,7 @@ def file_upload_echo_content(request):
|
|||
"""
|
||||
def read_and_close(f):
|
||||
with f:
|
||||
return f.read().decode('utf-8')
|
||||
return f.read().decode()
|
||||
r = {k: read_and_close(f) for k, f in request.FILES.items()}
|
||||
return JsonResponse(r)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue