upload parameters are as follows
-119938005516990736431240663742
Content-Disposition: form-data; name= "_ csrf"
pvlVVBZkGPROBe1zHHx17fc5VKtVMcLMGS6TKFn82HPFjgMBeCsvnXtf3SksKELVmm4tziJFipMoSPp3Ds2SQA==
-119938005516990736431240663742
Content-Disposition: form-data; name= "ReportForm [url]"
-119938005516990736431240663742
Content-Disposition: form-data; name= "ReportForm [url]"; filename= "br > Content-Type: application/pdf
that"s what I wrote. Why don"t I always upload it to pdf? Because the server always shows upload text?
files=[("ReportForm[url]",("COO:-18.pdf",open(file,"rb"),"Content-Type: application/pdf"))]
data={"_csrf":csrf_token}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
}
response=requests.post(url=url,cookies=cookies,files=files,data=data,headers=headers)