动态追踪- svg查看功能

This commit is contained in:
midoks
2023-08-26 22:23:13 +08:00
parent 600e2688f9
commit 2b86c375b0
4 changed files with 87 additions and 7 deletions
+6 -1
View File
@@ -64,8 +64,13 @@ class files_api:
filename = request.args.get('filename', '')
if not os.path.exists(filename):
return ''
is_attachment = True
if filename.endswith(".svg"):
is_attachment = False
response = make_response(send_from_directory(
os.path.dirname(filename), os.path.basename(filename), as_attachment=True))
os.path.dirname(filename), os.path.basename(filename), as_attachment=is_attachment))
return response
def zipApi(self):