file = request.FILES.get('file')
f = open('admin.json', 'wb')
for chunk in file.chunks():
f.write(chunk)
f.close()
from django.core.files.storage import FileSystemStorage
file = request.FILES.get('file', None)
fs = FileSystemStorage()
real_path = settings.MEDIA_ROOT + format_filename
fs.save(real_path, file)