I have a simple query in python 3. I have a path as var where I am passing the file path from the directory. File out.txt contains a list of many files path
Example: out.txt
c:/python/text1.txt c:/python/text2.txt c:/python/text3.txt
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)
If will run like this >uploading c:/python/text1.txt...then after the operation it returns back uploading next file