this is my python code
import requests
import json
token_url = ‘http://mydomain/api/authorize/access_token’
library = ‘http://mydomain/api/library’
client_id = ‘*********’
client_secret = ‘************************’
data = {‘grant_type’:‘client_credentials’}
access_token_response = requests.post(token_url,data=data,verify=False,allow_redirects=False,auth=(client_id, client_secret))
tokens = json.loads(access_token_response.text)
print("Bearer " + tokens[‘access_token’])
headers = {‘Authorization’: "Bearer " + tokens[‘access_token’],‘Cache-Control’:‘no-cache’,‘content-type’: ‘multipart/form-data’}
payload = {‘Content-Disposition’: ‘form-data’,‘name’:‘files’,‘filename’:“image.jpg”,}
data = json.dumps(payload)
response = requests.request(‘POST’,library,data=data,headers=headers)
print(response.text)
i’m getting this error with xibo upload api
“files”:[{“name”:“1492523640-7615”,“size”:1316610,“type”:“multipart/form-data; boundary=--------------------------449316675376425057078541”,“error”:“Filetype not allowed”}]}
i’m using xibo 1.8.9 version …