Add Item description for ALT Text

This commit is contained in:
Nico Jensen 2023-10-30 12:45:37 +01:00
parent 81da903fe8
commit a4c5920e68

View File

@ -60,7 +60,13 @@ def mediaUpload(access_token, url, file):
try:
with open(file, "rb") as imageFile:
f = {"file": imageFile}
response = requests.post(api_url, headers=headers, files=f)
data = {
"file": (file, imageFile),
"description": "API TEST"
}
json_data = json.dumps(data)
response = requests.post(api_url, headers=headers, files=data)
response.raise_for_status() # Wirft eine HTTPError-Exception, wenn der Statuscode nicht erfolgreich ist
try: