From 0fbc776526beaf29e179687aef2d645aa070ee1a Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Mon, 7 Oct 2024 10:55:13 +0200 Subject: [PATCH] working maybe files? --- alkatorapi/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alkatorapi/views.py b/alkatorapi/views.py index bc7e0f6..c16f94a 100644 --- a/alkatorapi/views.py +++ b/alkatorapi/views.py @@ -200,7 +200,7 @@ def photos(request): def upload_files(request): for name, file in request.FILES.items(): print(name) - rand = random.randint(9999999999999) + rand = random.randint(0, 9999999999999) random_name = f'photos/uploads/{rand}.jpg' with open(random_name, "wb+") as destination: for chunk in file.chunks():