multiple files probably!
This commit is contained in:
parent
696658e3c6
commit
be33fe9649
@ -209,7 +209,7 @@ def photos(request):
|
||||
|
||||
@csrf_exempt
|
||||
def upload_files(request):
|
||||
for file in request.FILES:
|
||||
for file in request.FILES['files']:
|
||||
rand = random.randint(0, 99999)
|
||||
random_name = f'photos/uploads/{rand}_{file.name}'
|
||||
with open(random_name, "wb+") as destination:
|
||||
|
Loading…
x
Reference in New Issue
Block a user