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:
eikek
2021-07-04 21:37:34 +02:00
parent 4e7b516d57
commit 1120434cd9
8 changed files with 85 additions and 60 deletions

View File

@ -20,18 +20,18 @@ It is a bash script that additionally needs
# Usage
```
./regenerate-previews.sh [docspell-base-url]
./regenerate-previews.sh [docspell-base-url] [admin-secret]
```
For example, if docspell is at `http://localhost:7880`:
```
./convert-all-pdfs.sh http://localhost:7880
./convert-all-pdfs.sh http://localhost:7880 test123
```
The script asks for your account name and password. It then logs in
and triggers the said endpoint. After this you should see a few tasks
running.
The script asks for the admin secret if not given to the command. It
then logs in and triggers the said endpoint. After this you should see
a few tasks running.
There will be one task per file to convert. All these tasks are
submitted with a low priority. So files uploaded through the webapp or