# Document management

## Introduction

#### EverReal provides 2 ways to upload files.

1. Uploading a **document** that can be linked to various entities directly.
2. Uploading a **file** for later use that can be transformed to a document later or can be used for other data sources, like linking it to a listing.

#### Most common scenarios

* For uploading documents to properties and units, please use the [document-management](https://api-docs.everreal.co/endpoints/document-management/document-management "mention") page.
* For uploading files for listings please use the [simple-file-upload](https://api-docs.everreal.co/endpoints/document-management/simple-file-upload "mention") page.

#### Important to know

* All files uploaded to your account are tracked and are subject to extra cost if the account file size exceeds 10GB
* Maximum file size allowed to be uploaded is 20MB
* We don't support uploading in chunks for bigger file sizes - yet
* Images are resized automatically for storage optimisation to a maximum size /or width of 2500px.
* A relative path needs to be passed for every upload as `resourcePath` property and we will return the final `resourcePath` with the company namespace appended to it, similar to something like: `subdomain/{accountUniqueIdentifier}/{resourcePath}`.&#x20;
  * for documents we also append the document id at the end, so the final resourcePath will look like `subdomain/{accountUniqueIdentifier}/{resourcePath}/{documentId}`
* To get the complete URL to the file, you should append one of these urls:
  * `https://resources.everreal.co/returnedResourcePath` for production environment
  * `https://qa.resources.everreal.co/returnedResourcePath` for staging environment
* We don't provide an "update" endpoint, because the CDN will cache the resources, thus we recommend always creating a new file and to delete the old one. The CDN cache is between 1h to 24h.

#### GDPR

* All files are stored in AWS S3 and encrypted on bucket level and only we, as EverReal have access to it.
