gen
This commit is contained in:
@@ -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)
|
Reference in New Issue
Block a user