From c5d05f54cbf76fd3104d3d799b86c6689d3fefcd Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Mon, 7 Oct 2024 11:24:12 +0200 Subject: [PATCH] multiple files --- alkatorapi/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alkatorapi/views.py b/alkatorapi/views.py index af9c21e..3c8148d 100644 --- a/alkatorapi/views.py +++ b/alkatorapi/views.py @@ -209,7 +209,7 @@ def photos(request): @csrf_exempt def upload_files(request): - for name, file in request.FILES.items(): + for file in request.FILES: print(name) rand = random.randint(0, 99999) random_name = f'photos/uploads/{rand}_{file.name}'