Show attachment meta data in ui

Allow to view the extracted text and results from text analysis of an
attachment.
This commit is contained in:
Eike Kettner
2020-02-08 12:23:59 +01:00
parent 070b4f8452
commit d2edddd238
4 changed files with 315 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ module Api exposing
, deleteSource
, deleteTag
, deleteUser
, getAttachmentMeta
, getCollective
, getCollectiveSettings
, getContacts
@@ -61,6 +62,7 @@ module Api exposing
, versionInfo
)
import Api.Model.AttachmentMeta exposing (AttachmentMeta)
import Api.Model.AuthResult exposing (AuthResult)
import Api.Model.BasicResult exposing (BasicResult)
import Api.Model.Collective exposing (Collective)
@@ -112,6 +114,23 @@ import Util.Http as Http2
--- Attachment Metadata
getAttachmentMeta :
Flags
-> String
-> (Result Http.Error AttachmentMeta -> msg)
-> Cmd msg
getAttachmentMeta flags id receive =
Http2.authGet
{ url = flags.config.baseUrl ++ "/api/v1/sec/attachment/" ++ id ++ "/meta"
, account = getAccount flags
, expect = Http.expectJson receive Api.Model.AttachmentMeta.decoder
}
--- Get Sent Mails