the file i downloaded from gateway server to my PC by the script system.perspective.download
i can not open the file in my PC
but i can open the file in gateway server PC
filetype is image
from wellrain_lib import messageBox
try:
# 打开指定路径的文件
path = self.getSibling("Table").custom.sel_row.path
name = self.getSibling("Table").custom.sel_row.filename
f = open(path, mode = "rb")
file_data = f.read()
# 执行下载操作
system.perspective.download(name,file_data,contentType = "multipart/form-data")
except:
messageBox.errorBox()
the image i downloaded to my PC open like this:
the PDF file i downloaded