Change the parameter to requests.posts from files=files,
where files contained the file reference, to
data=file.read().
This was done, since with the previous configuration binary files were
corrupted during upload.
Change-Id: I85c68adc32e031c7f1f101e9d8bfcb5a7acb0670
Issue-Id: RELENG-1591
Signed-off-by: Bengt Thuree <bthuree@linuxfoundation.org>
if parameters:
resp = requests.post(url, data=parameters, files=files)
else:
- resp = requests.post(url, files=files)
+ resp = requests.post(url, data=upload_file.read())
except requests.exceptions.MissingSchema:
raise requests.HTTPError("Not valid URL: {}".format(url))
except requests.exceptions.ConnectionError: