Upload the file of a preview. Send the file in a multipart form. For a picture, the route makes a square thumbnail, a rectangle thumbnail and a preview picture. For a movie, the route normalizes the movie and makes the thumbnails. Use normalize=false to keep the movie as it is. You cannot upload a file again for a preview that already has a file. You must be able to do actions on the task. A client of the project cannot use this route.
Query parameters
-
Normalize the movie
Default value is
true. -
Process the file in the request instead of the job queue
Default value is
false.
POST
/pictures/preview-files/{instance_id}
curl
curl -X POST "http://api.example.com/pictures/preview-files/a24a6ea4-ce75-4665-a070-57453082c25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/pictures/preview-files/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (201)
{
"id": "a24a6ea4-ce75-4665-a070-57453082c250",
"extension": "png",
"file_size": 1024000
}