I'm trying to upload a file, using the requests library to submit a POST.
This works fine:
theFile = { 'LUuploadFile': ("linea.ipa", open(path_to_file, 'rb'), 'application/octet-stream') }
request = requests.post(url, files=theFile)
This throws an error:
theFile = { 'LUuploadFile': ("línea.ipa", open(path_to_file, 'rb'), 'application/octet-stream') }
request = requests.post(url, files=theFile)
The error is very odd:
( <class 'requests.exceptions.ConnectionError'>,
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='fupload.apperian.com', port=443):
Max retries exceeded with url: /upload?transactionID=...
(Caused by <class 'socket.error'>: [Errno 32] Broken pipe)",),),
<traceback object at 0x100a8e3f8>)
It's not the server, it accepts the filename if I use curl
:
curl --form "LUuploadFile=@línea.ipa" http://...