Here is the python code snippet
with open(path, "rb") as sample:
payload = {
'options': (None,json.dumps (options),'application/json'),'filename':(os.path.basename(path), sample,'application/octet-stream')
}
response = requests.request ("POST", url, headers=headers, files=payload, verify=False)
Files are usually 2GB. I need to upload but while uploading, I am getting a memory error.
File "C:\Users\H3731736\PycharmProjects\website\venv\lib\site-packages\urllib3\filepost.py", line 92, in encode_multipart_formdata
body.write(b"\r\n")
Error:MemoryError
Please help me understand why this happening and how to solve this.