mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
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:
@ -18,6 +18,12 @@ object MakePreviewArgs {
|
||||
|
||||
val taskName = Ident.unsafe("make-preview")
|
||||
|
||||
def replace(attach: Ident): MakePreviewArgs =
|
||||
MakePreviewArgs(attach, StoreMode.Replace)
|
||||
|
||||
def whenMissing(attach: Ident): MakePreviewArgs =
|
||||
MakePreviewArgs(attach, StoreMode.WhenMissing)
|
||||
|
||||
sealed trait StoreMode extends Product {
|
||||
final def name: String =
|
||||
productPrefix.toLowerCase()
|
||||
|
Reference in New Issue
Block a user