Update docs and screenshots
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 178 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 183 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 183 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 116 KiB |
@ -29,6 +29,8 @@ You can enable or disable this task. A disabled task will not run
|
||||
periodically. You can still choose to run it manually if you click the
|
||||
`Start Once` button.
|
||||
|
||||
## E-Mail Settings
|
||||
|
||||
Then you need to specify which [IMAP
|
||||
connection](@/docs/webapp/emailsettings.md#imap-settings) to use.
|
||||
|
||||
@ -41,12 +43,6 @@ mails in your inbox. Any other folder is usually case-sensitive
|
||||
except the INBOX folder). Type in a folder name and click the add
|
||||
button on the right.
|
||||
|
||||
Then the field *Received Since Hours* defines how many hours to go
|
||||
back and look for mails. Usually there are many mails in your inbox
|
||||
and importing them all at once is not feasible or desirable. It can
|
||||
work together with the *Schedule* field below. For example, you could
|
||||
run this task all 6 hours and read mails from 8 hours back.
|
||||
|
||||
The next two settings tell docspell what to do once a mail has been
|
||||
submitted to docspell. It can be moved into another folder in your
|
||||
mail account. This moves it out of the way for the next run. You can
|
||||
@ -55,20 +51,52 @@ deleted and not moved to your trash folder*. If both options are off,
|
||||
nothing happens with that mail, it simply stays (and could be re-read
|
||||
on the next run).
|
||||
|
||||
When docspell creates an item from a mail, it needs to set a direction
|
||||
value (incoming or outgoing). If you know that all mails you want to
|
||||
import have a specific directon, then you can set it here. Otherwise,
|
||||
*automatic* means that docspell chooses a direction based on the
|
||||
`From` header of a mail. If the `From` header is an e-mail address
|
||||
that belongs to a “concerning” person in your address book, then it is
|
||||
set to "outgoing". Otherwise it is set to "incoming". To support this,
|
||||
you need to add your own e-mail address(es) to your address book.
|
||||
## Filtering
|
||||
|
||||
The following properties allow to filter mails that are imported.
|
||||
|
||||
Then the field *Received Since Hours* defines how many hours to go
|
||||
back and look for mails. Usually there are many mails in your inbox
|
||||
and importing them all at once is not feasible or desirable. It can
|
||||
work together with the *Schedule* field below. For example, you could
|
||||
run this task all 6 hours and read mails from 8 hours back.
|
||||
|
||||
The *File Filter* can be specified as a glob to only import mail
|
||||
attachments based on their file name. For example, a value of `*.pdf`
|
||||
will only import files that have a `pdf` extension. The mail body is
|
||||
named `mail.html` by convention and would be excluded when only
|
||||
specifying `*.pdf`. You can combine multiple globs using OR via the
|
||||
pipe `|` symbol. For example, to also include the mail body as well as
|
||||
all pdf attachments: `*.pdf|mail.html`.
|
||||
|
||||
The *Subject Filter* is a glob filter that is applied to the mail
|
||||
subject. This can be used to only import mails whose subject have some
|
||||
pattern. For example, if your scanner mails to you with a certain
|
||||
subject like _"Scanned Document 214"_, you could include those via a
|
||||
`Scanned Document*` pattern.
|
||||
|
||||
## Metadata
|
||||
|
||||
The last properties allow to specify some metadata that are
|
||||
automatically attached to the items being created.
|
||||
|
||||
Every item in docspell has a direction value (incoming or outgoing).
|
||||
If you know that all mails you want to import have a specific
|
||||
directon, then you can set it here. Otherwise, *automatic* means that
|
||||
docspell chooses a direction based on the `From` header of a mail. If
|
||||
the `From` header is an e-mail address that belongs to a “concerning”
|
||||
person in your address book, then it is set to "outgoing". Otherwise
|
||||
it is set to "incoming". To support this, you need to add your own
|
||||
e-mail address(es) to your address book.
|
||||
|
||||
The *Item Folder* setting is used to put all items that are created
|
||||
from mails into the specified [folder](metadata#folders). If you
|
||||
define a folder here, where you are not a member, you won't find
|
||||
resulting items.
|
||||
|
||||
The *Tags* setting can be used to associate a fixed number of tags to
|
||||
all items that are imported from this mail task.
|
||||
|
||||
The last field is the *Schedule* which defines when and how often this
|
||||
task should run. The syntax is similiar to a date-time string, like
|
||||
`2019-09-15 12:32`, where each part is a pattern to also match multple
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 77 KiB |
@ -92,95 +92,7 @@ docspell count the files uploaded through the web interface, just
|
||||
create a source (can be inactive) with that name (`webapp`).
|
||||
|
||||
|
||||
# Integration Endpoint
|
||||
# Other options
|
||||
|
||||
Another option for uploading files is the special *integration
|
||||
endpoint*. This endpoint allows an admin to upload files to any
|
||||
collective, that is known by name.
|
||||
|
||||
```
|
||||
/api/v1/open/integration/item/[collective-name]
|
||||
```
|
||||
|
||||
The endpoint is behind `/api/v1/open`, so this route is not protected
|
||||
by an authentication token (see [REST Api](@/docs/api/_index.md) for
|
||||
more information). However, it can be protected via settings in the
|
||||
configuration file. The idea is that this endpoint is controlled by an
|
||||
administrator and not the user of the application. The admin can
|
||||
enable this endpoint and choose between some methods to protect it.
|
||||
Then the administrator can upload files to any collective. This might
|
||||
be useful to connect other trusted applications to docspell (that run
|
||||
on the same host or network).
|
||||
|
||||
The endpoint is disabled by default, an admin must change the
|
||||
`docspell.server.integration-endpoint.enabled` flag to `true` in the
|
||||
[configuration file](@/docs/configure/_index.md#rest-server).
|
||||
|
||||
If queried by a `GET` request, it returns whether it is enabled and
|
||||
the collective exists.
|
||||
|
||||
It is also possible to check for existing files using their sha256
|
||||
checksum with:
|
||||
|
||||
```
|
||||
/api/v1/open/integration/checkfile/[collective-name]/[sha256-checksum]
|
||||
```
|
||||
|
||||
See the [SMTP gateway](@/docs/tools/smtpgateway.md) or the [consumedir
|
||||
script](@/docs/tools/consumedir.md) for examples to use this endpoint.
|
||||
|
||||
# The Request
|
||||
|
||||
This gives more details about the request for uploads. It is a http
|
||||
`multipart/form-data` request, with two possible fields:
|
||||
|
||||
- meta
|
||||
- file
|
||||
|
||||
The `file` field can appear multiple times and is required at least
|
||||
once. It is the part containing the file to upload.
|
||||
|
||||
The `meta` part is completely optional and can define additional meta
|
||||
data, that docspell uses to create items from the given files. It
|
||||
allows to transfer structured information together with the
|
||||
unstructured binary files.
|
||||
|
||||
The `meta` content must be `application/json` containing this
|
||||
structure:
|
||||
|
||||
``` elm
|
||||
{ multiple: Bool
|
||||
, direction: Maybe String
|
||||
, folder: Maybe String
|
||||
, skipDuplicates: Bool
|
||||
}
|
||||
```
|
||||
|
||||
The `multiple` property is by default `true`. It means that each file
|
||||
in the upload request corresponds to a single item. An upload with 5
|
||||
files will result in 5 items created. If it is `false`, then docspell
|
||||
will create just one item, that will then contain all files.
|
||||
|
||||
Furthermore, the direction of the document (one of `incoming` or
|
||||
`outgoing`) can be given. It is optional, it can be left out or
|
||||
`null`.
|
||||
|
||||
A `folder` id can be specified. Each item created by this request will
|
||||
be placed into this folder. Errors are logged (for example, the folder
|
||||
may have been deleted before the task is executed) and the item is
|
||||
then not put into any folder.
|
||||
|
||||
The `skipDuplicates` is optional and set to `false` if not specified.
|
||||
It configures the processing task. If set to `true`, the processing
|
||||
task will skip all input files that are already present in docspell.
|
||||
|
||||
This kind of request is very common and most programming languages
|
||||
have support for this. For example, here is another curl command
|
||||
uploading two files with meta data:
|
||||
|
||||
``` bash
|
||||
curl -XPOST -F meta='{"multiple":false, "direction": "outgoing"}' \
|
||||
-F file=@letter-en-source.pdf \
|
||||
-F file=@letter-de-source.pdf \
|
||||
http://192.168.1.95:7880/api/v1/open/upload/item/3H7hvJcDJuk-NrAW4zxsdfj-K6TMPyb6BGP-xKptVxUdqWa
|
||||
```
|
||||
More details about the actual http request and other upload options
|
||||
can be found [here](@/docs/api/upload.md).
|
||||
|