jfpelletier
3 months agoContributor
Multipart Reader failure - 'content-type' was not found
Hello all, I'm successfully using Postman to submit a file and payload to a SnapLogic triggered task using the Multipart Reader snap, however when I try the same using Python, I'm getting an error l...
- 3 months ago
import requests
url = "https://MyURL.com?bearer_token=abc123"
files=[
('file',('fileName.png',open('file.png','rb'),'image/png'))
]
headers = {}response = requests.request("POST", url, headers=headers, files=files)
print(response.text)
Try this. The first argument in the file line should be the target filename you want to use. Let me know if this helps.
Regards,
Bojan