mirror of
https://github.com/TheAnachronism/docspell.git
synced 2024-11-13 02:31:10 +00:00
1120434cd9
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.
23 lines
532 B
Bash
Executable File
23 lines
532 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# This script submits a job to regenerate all preview images. This may
|
|
# be necessary if you change the dpi setting that affects the size of
|
|
# the preview.
|
|
|
|
set -e
|
|
|
|
CURL_CMD="curl"
|
|
JQ_CMD="jq"
|
|
|
|
|
|
BASE_URL="${1:-http://localhost:7880}"
|
|
TRIGGER_URL="$BASE_URL/api/v1/admin/attachments/generatePreviews"
|
|
|
|
echo "Login to trigger regenerating preview images."
|
|
echo "Using url: $BASE_URL"
|
|
echo -n "Admin Secret: "
|
|
read -s ADMIN_SECRET
|
|
echo
|
|
|
|
curl --fail -XPOST -H "Docspell-Admin-Secret: $ADMIN_SECRET" "$TRIGGER_URL"
|