multiple files

This commit is contained in:
Martin Quarda 2024-10-07 11:24:12 +02:00
parent 9820aa10be
commit c5d05f54cb

View File

@ -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}'