Add attachments-only filter to uploads

When uploading a file which is an e-mail, this option allows to skip
the mail body when the file is being processed.
This commit is contained in:
eikek
2021-08-21 13:37:17 +02:00
parent bb8a6c054b
commit 751fa3da5a
11 changed files with 84 additions and 31 deletions

View File

@ -337,7 +337,8 @@ trait Conversions {
m.skipDuplicates.getOrElse(false),
m.fileFilter.getOrElse(Glob.all),
m.tags.map(_.items).getOrElse(Nil),
m.language
m.language,
m.attachmentsOnly
)
)
)
@ -345,7 +346,17 @@ trait Conversions {
.getOrElse(
(
true,
UploadMeta(None, sourceName, None, validFileTypes, false, Glob.all, Nil, None)
UploadMeta(
None,
sourceName,
None,
validFileTypes,
false,
Glob.all,
Nil,
None,
None
)
)
.pure[F]
)

View File

@ -125,7 +125,8 @@ object ScanMailboxRoutes {
settings.tags.map(_.items),
settings.subjectFilter,
settings.language,
settings.postHandleAll
settings.postHandleAll,
settings.attachmentsOnly
)
)
)
@ -159,6 +160,7 @@ object ScanMailboxRoutes {
task.args.fileFilter,
task.args.subjectFilter,
task.args.language,
task.args.postHandleAll
task.args.postHandleAll,
task.args.attachmentsOnly
)
}