mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #7651: uploading multiple files with the same name now work. Also, in order to test the problem the test client now handles uploading multiple files at once. Patch from Mike Axiak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -67,4 +67,14 @@ def file_upload_quota_broken(request):
|
||||
"""
|
||||
response = file_upload_echo(request)
|
||||
request.upload_handlers.insert(0, QuotaUploadHandler())
|
||||
return response
|
||||
return response
|
||||
|
||||
def file_upload_getlist_count(request):
|
||||
"""
|
||||
Check the .getlist() function to ensure we receive the correct number of files.
|
||||
"""
|
||||
file_counts = {}
|
||||
|
||||
for key in request.FILES.keys():
|
||||
file_counts[key] = len(request.FILES.getlist(key))
|
||||
return HttpResponse(simplejson.dumps(file_counts))
|
||||
|
||||
Reference in New Issue
Block a user