I am trying to upload a package binary over to the RestAPI of storage using python. But it keeps throwing error and couldn't upload the file. Below is the code I am using to achieve it :
jsonheaderup={'Content-Type': 'application/octet-stream'}
file = open('install.pkg.gz', 'rb')
files = {'file': file}
def upload_code():
u = requests.post("%s/api/sys/v2/updates" % (url), files=files, verify=False, headers=jsonheaderup)
l = json.loads(u.text)
upload_code()
{u'fault': {u'message': u'required input argument is missing (upload)', u'code': 400, u'name': u'ERR_MISSING_ARG'}}zfstag?