Upload an image
curl --request POST \
--url http://localhost:5001/api/v1/ppt/images/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "http://localhost:5001/api/v1/ppt/images/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
options.body = form;
fetch('http://localhost:5001/api/v1/ppt/images/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Files and Images
Upload image (self-hosted)
Upload an image to this Presenton instance.
POST
/
api
/
v1
/
ppt
/
images
/
upload
Upload an image
curl --request POST \
--url http://localhost:5001/api/v1/ppt/images/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "http://localhost:5001/api/v1/ppt/images/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
options.body = form;
fetch('http://localhost:5001/api/v1/ppt/images/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?