mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Integrate support for more files into processing and upload
The restriction that only pdf files can be uploaded is removed. All files can now be uploaded. The processing may not process all. It is still possible to restrict file uploads by types via a configuration.
This commit is contained in:
@ -35,7 +35,7 @@ type alias Settings =
|
||||
defaultSettings : Settings
|
||||
defaultSettings =
|
||||
{ classList = \_ -> [ ( "ui placeholder segment", True ) ]
|
||||
, contentTypes = [ "application/pdf" ]
|
||||
, contentTypes = []
|
||||
}
|
||||
|
||||
|
||||
@ -148,7 +148,11 @@ filterMime settings files =
|
||||
pred f =
|
||||
List.member (File.mime f) settings.contentTypes
|
||||
in
|
||||
List.filter pred files
|
||||
if settings.contentTypes == [] then
|
||||
files
|
||||
|
||||
else
|
||||
List.filter pred files
|
||||
|
||||
|
||||
dropDecoder : D.Decoder Msg
|
||||
|
Reference in New Issue
Block a user