working maybe files?
This commit is contained in:
parent
b0b5449ddb
commit
0fbc776526
@ -200,7 +200,7 @@ def photos(request):
|
|||||||
def upload_files(request):
|
def upload_files(request):
|
||||||
for name, file in request.FILES.items():
|
for name, file in request.FILES.items():
|
||||||
print(name)
|
print(name)
|
||||||
rand = random.randint(9999999999999)
|
rand = random.randint(0, 9999999999999)
|
||||||
random_name = f'photos/uploads/{rand}.jpg'
|
random_name = f'photos/uploads/{rand}.jpg'
|
||||||
with open(random_name, "wb+") as destination:
|
with open(random_name, "wb+") as destination:
|
||||||
for chunk in file.chunks():
|
for chunk in file.chunks():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user