Check the .getlist() function to ensure we receive the correct number of files.
(request)
| 134 | |
| 135 | |
| 136 | def file_upload_getlist_count(request): |
| 137 | """ |
| 138 | Check the .getlist() function to ensure we receive the correct number of |
| 139 | files. |
| 140 | """ |
| 141 | file_counts = {} |
| 142 | |
| 143 | for key in request.FILES: |
| 144 | file_counts[key] = len(request.FILES.getlist(key)) |
| 145 | return JsonResponse(file_counts) |
| 146 | |
| 147 | |
| 148 | def file_upload_errors(request): |
nothing calls this directly
no test coverage detected