This commit is contained in:
Bryan Gerlach
2024-10-11 14:27:44 -05:00
parent 2164f6af61
commit ff26523be5
2 changed files with 7 additions and 12 deletions

View File

@@ -334,14 +334,4 @@ def save_png(file, uuid, domain):
imageJson['uuid'] = uuid
imageJson['file'] = file.name
#return "%s/%s" % (domain, file_save_path)
return json.dumps(imageJson)
def save_custom_client(request):
file = request.FILES['file']
file_save_path = "clients/custom/%s" % file.name
Path("clients/custom").mkdir(parents=True, exist_ok=True)
with open(file_save_path, "wb+") as f:
for chunk in file.chunks():
f.write(chunk)
return HttpResponse("File saved successfully!")
return json.dumps(imageJson)