Provide endpoints to submit tasks to re-generate previews

The scaling factor can be given in the config file. When this changes,
images can be regenerated via POSTing to certain endpoints. It is
possible to regenerate just one attachment preview or all within a
collective.
This commit is contained in:
Eike Kettner
2020-11-09 01:18:48 +01:00
parent 6037b54959
commit f4e50c5229
20 changed files with 218 additions and 38 deletions

View File

@ -2526,6 +2526,24 @@ paths:
schema:
type: string
format: binary
post:
tags: [ Attachment ]
summary: (Re)generate a preview image.
description: |
Submits a task that generates a preview image for this
attachment. The existing preview will be replaced.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
responses:
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
/sec/attachment/{id}/meta:
get:
tags: [ Attachment ]