wrong encoding

the file i downloaded from gateway server to my PC by the script

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
		# 打开指定路径的文件
		path = self.getSibling("Table").custom.sel_row.path
		name = self.getSibling("Table").custom.sel_row.filename
		f = open(path, mode = "rb")
		file_data =
		# 执行下载操作,file_data,contentType = "multipart/form-data")

the image i downloaded to my PC open like this:

the PDF file i downloaded

Use the proper contentType for your image. multipart/form-data is for posting a form TO a server, not downloading FROM a server.

1 Like