# Files handling

This document describes how files are handled in this appication.

# Types of files

static files: files that are not changed by the application, e.g. images, fonts, etc.¨

### content documents:

Files that belong to the content and are managed by the content editors in the CMS (pdf, excel, word, etc.)

### user documents:

Files that are uploaded by the users (pdf, etc.). Therefore not visible in the CMS.
Images are handled seprately from documents since images require additional processing (resizing, cropping, etc.).
Visible in the django admin.

### content images:

Images that belong to the content and are managed by the content editors in the CMS.

## User documents

User documents and images hare handled by uploadcare. In the database we oly have the url. 

## Content images

Content Images are served directly from S3. The permissions are handled by django. Request to django are checked and redirected to the S3 bucket.
