2020
09-25
09-25
python上传时包含boundary时的解决方法
python上传时,包含boundary时的处理方式img_url=[]upload_pic_url="http://admin.mdt.oujingroup.cn/uploader/img"headers={'X-Requested-With':'XMLHttpRequest',}img_file=open(name,'rb')multipart_encoder=MultipartEncoder(fields={'file':('test.jpg',img_file,"image/jpeg"),},boundary='----WebKitFormBoundaryJ2aGzfsg35YqeT7X')headers['Content-Type']=multipart_e...
继续阅读 >