dever 6 년 전
부모
커밋
7f3d030d3e
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      front/api/main.py

+ 2 - 0
front/api/main.py

@@ -308,5 +308,7 @@ class down_path(Load):
 			# 没有文件信息,则不允许下载
 			self.out('没有权限下载')
 
+		self.set_header ('Content-Type', 'application/octet-stream')
+		self.set_header ('Content-Disposition', 'attachment; filename='+file['local'])
 		content = File.readContent(file['local'])
 		self.write(content)