utils.py 243 B

12345
  1. def handle_uploaded_file(file):
  2. file.name = "logo."+file.name.split('.')[1]
  3. with open('SharixAdmin/static/SharixAdmin/img/'+file.name, 'wb+') as destination:
  4. for chunk in file.chunks():
  5. destination.write(chunk)