Add the attachment-only option to a source

The upload request can now contain a boolean for importing only
attachments when e-mails are uploaded. This option is now also added
to a source url.

Refs: #983
This commit is contained in:
eikek
2021-08-23 14:19:11 +02:00
parent 45f6357f49
commit 993a391c13
9 changed files with 71 additions and 7 deletions

View File

@ -183,7 +183,9 @@ object OUpload {
if (data.meta.fileFilter == Glob.all) src.source.fileFilterOrAll
else data.meta.fileFilter,
tags = (data.meta.tags ++ src.tags.map(_.tagId.id)).distinct,
language = data.meta.language.orElse(src.source.language)
language = data.meta.language.orElse(src.source.language),
attachmentsOnly =
data.meta.attachmentsOnly.orElse(src.source.attachmentsOnly.some)
),
priority = src.source.priority
)