大文件分块保存
This commit is contained in:
parent
88c4c01454
commit
818176f58a
|
@ -48,7 +48,8 @@ def upload(req):
|
||||||
filepath = os.path.join(user_upload_folder, file_name)
|
filepath = os.path.join(user_upload_folder, file_name)
|
||||||
filepath = filepath.replace('\\','/')
|
filepath = filepath.replace('\\','/')
|
||||||
with open( filepath, 'wb') as f:
|
with open( filepath, 'wb') as f:
|
||||||
f.write(req.FILES['mf'].read())
|
for i in req.FILES['mf'].chunks():
|
||||||
|
f.write(i)
|
||||||
return JsonResponse({"code":1,"filename":file_name,"filepath":filepath})
|
return JsonResponse({"code":1,"filename":file_name,"filepath":filepath})
|
||||||
#查询
|
#查询
|
||||||
def selectDate(req):
|
def selectDate(req):
|
||||||
|
|
Loading…
Reference in New Issue