Commit 01024207 authored by wanli's avatar wanli

🐞 fix(): 修复添加应用上传文件获取路径bug

parent 07e95e9d
''' '''
Author: your name Author: your name
Date: 2021-06-15 17:40:09 Date: 2021-06-15 17:40:09
LastEditTime: 2021-07-20 19:15:04 LastEditTime: 2021-07-22 12:56:09
LastEditors: Please set LastEditors LastEditors: Please set LastEditors
Description: In User Settings Edit Description: In User Settings Edit
FilePath: \evm-store\tools\resources\manager.py FilePath: \evm-store\tools\resources\manager.py
...@@ -59,7 +59,7 @@ def debug(): ...@@ -59,7 +59,7 @@ def debug():
(r"/ws/v1/notify", NotifyHandler), (r"/ws/v1/notify", NotifyHandler),
(r'.*', FallbackHandler, dict(fallback=wsgi_app)) (r'.*', FallbackHandler, dict(fallback=wsgi_app))
], **{ 'debug': True, }) ], **{ 'debug': True, })
application.listen(3001, address='127.0.0.1', xheaders=True) application.listen(3000, address='127.0.0.1', xheaders=True)
# 主进程退出信号 # 主进程退出信号
signal.signal(signal.SIGINT, raise_graceful_exit) signal.signal(signal.SIGINT, raise_graceful_exit)
......
...@@ -97,7 +97,7 @@ class AppResourceList(Resource): ...@@ -97,7 +97,7 @@ class AppResourceList(Resource):
filename = secure_filename(logo.filename) filename = secure_filename(logo.filename)
file_path = upload_path.joinpath(filename) file_path = upload_path.joinpath(filename)
logo.save(file_path) logo.save(file_path)
params.update({ "app_icon": file_path.relative_to(relative_path).resolve().as_posix() }) params.update({ "app_icon": file_path.relative_to(relative_path).as_posix() })
# 应用源文件 # 应用源文件
fileList = request.files.getlist('fileList') fileList = request.files.getlist('fileList')
...@@ -110,7 +110,7 @@ class AppResourceList(Resource): ...@@ -110,7 +110,7 @@ class AppResourceList(Resource):
filename = secure_filename(f.filename) filename = secure_filename(f.filename)
file_path = upload_path.joinpath(filename) file_path = upload_path.joinpath(filename)
f.save(file_path.resolve().as_posix()) f.save(file_path.resolve().as_posix())
files.append(file_path.relative_to(relative_path).resolve().as_posix()) files.append(file_path.relative_to(relative_path).as_posix())
params.update({ "fileList": files, "epk_path": upload_path, 'real_ip': request.headers.get('X-Forwarded-For', '127.0.0.1') }) params.update({ "fileList": files, "epk_path": upload_path, 'real_ip': request.headers.get('X-Forwarded-For', '127.0.0.1') })
result, message = signalManager.actionPostApp.emit(params, jwt) result, message = signalManager.actionPostApp.emit(params, jwt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment