Add Item description for ALT Text
This commit is contained in:
parent
81da903fe8
commit
a4c5920e68
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user