mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Replace generating preview images with an admin endpoint
It doesn't make much sense to have this per collective, because this is triggered by an admin after changing the server config file. So it is now implemented as an admin endpoint that affects all files.
This commit is contained in:
@ -1136,30 +1136,6 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
|
||||
/sec/collective/previews:
|
||||
post:
|
||||
operationId: "sec-collective-previews-start-generate"
|
||||
tags: [ Collective ]
|
||||
summary: Starts the generate previews task
|
||||
description: |
|
||||
Submits a task that re-generates preview images of all
|
||||
attachments of the current collective. Each existing preview
|
||||
image will be replaced.
|
||||
|
||||
This can be used after changing the `preview` settings.
|
||||
|
||||
If only preview images of selected attachments should be
|
||||
regenerated, see the `/sec/attachment/{id}/preview` endpoint.
|
||||
security:
|
||||
- authTokenHeader: []
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
|
||||
/sec/user:
|
||||
get:
|
||||
operationId: "sec-user-get-all"
|
||||
@ -1348,6 +1324,32 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ResetPasswordResult"
|
||||
|
||||
/admin/attachments/generatePreviews:
|
||||
post:
|
||||
operationId: "admin-attachments-generate-previews"
|
||||
tags: [Attachment, Admin]
|
||||
summary: (Re)generate all preview images
|
||||
description: |
|
||||
Submits a task that re-generates preview images of all
|
||||
attachments. Each existing preview image will be replaced.
|
||||
|
||||
This can be used after changing the `preview` settings.
|
||||
|
||||
If only preview images of selected attachments should be
|
||||
regenerated, see the `/sec/attachment/{id}/preview` endpoint.
|
||||
|
||||
This is an admin route, you need to specify the secret from
|
||||
the config file via a http header `Docspell-Admin-Secret`.
|
||||
security:
|
||||
- adminHeader: []
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/BasicResult"
|
||||
|
||||
/sec/source:
|
||||
get:
|
||||
operationId: "sec-source-get-all"
|
||||
|
Reference in New Issue
Block a user