# File management

TS solutions will often include files either as related content or generated artifacts.

All you have to do to add file support for a solution, is adding field of type Files. Office files can be edited online (WebDAV) and media files will be handled gracefully.

Note that it is also possible to bulk convert documents to structured data using [AI document conversion](https://docs.tsnocode.com/books/features/page/ai-conversion "Features/AI conversion").

## <span class="mw-headline" id="bkmrk-webdav-editing-1">WebDAV editing</span>

WebDAV will the user to edit files directly without the need for downloading and the uploading the files. Note that you must have WebDAV enabled software such as Microsoft Office installed.

Supported formats include

- Word (docx)
- Excel (xlsx)
- Powerpoint (pptx)

If the server is added as a trusted site, it is also possible WebDAV edit files containing macros (doxm,xlsm,pptm).

### <span class="mw-headline" id="bkmrk-instructions-1">Instructions</span>

1. Enable [WebDAV in configuration](https://wiki.tsnocode.com/index.php?title=WebDAV "WebDAV")
2. Click the icon with pencil overlay to edit a file directly

## <span class="mw-headline" id="bkmrk-document-generation-1">Document generation</span>

Documents can be generated by inserting data in special tags in predefined templates.

Output includes

- Word
- Excel
- Powerpoint
- PDF

### <span class="mw-headline" id="bkmrk-instructions-3">Instructions</span>

1. Entity &gt; Advanced
2. In template list press: Add
3. Upload file 
    - The file can contain tags that must match field name in the solution
4. Set displayed template name
5. Optionally set output fieldname (must be a file field)

## <span class="mw-headline" id="bkmrk-document-signing-1">Document signing</span>

Signing will be handled by external providers.  
TS supports

- Criipto (MitID, BankID, etc.)
- DocuSign

Unless you need international signatures, TS recommends Criipto. (Docusign pricing is steep and the plans are quite inflexible).

### <span class="mw-headline" id="bkmrk-instructions-5">Instructions</span>

Use the following to set up Criipto document signing

1. Create an appropriate template
2. Add an [Status action](https://docs.tsnocode.com/books/features/page/status-action "Features/Workflow engine")
    - Activate codeunit execution
    - Set codeunit to 
        - dk.tempusserva.signing.criipto.CriiptoStatusAction
        - dk.tempusserva.signing.criipto.CriiptoStatusActionGenerator
3. Modules &gt; Configurations 
    - oauthCriiptoAllow: true
    - oauthCriiptoClient: From Criipto setup
    - oauthCriiptoHost: From Criipto setup

## <span class="mw-headline" id="bkmrk-media-files-1">Media files</span>

Media files are natively supported without the need to change anything

- Images have thumbnails generated
- Videos open in a player
- Videos support streaming (jumping / skipping in the playback)

It is also possible to use specialized fields in solutions

- Files: Pictures 
    - Image uploads on mobile devices can use camera as a source
- Files: Videos

Note that it is quite easy to set up an automated video scaling process, if the underlying storage is S3.