# Storing and processing Setka Editor files

There are 2 ways to store and process resources received from Setka Editor.

### 1. Storing links to resources, dynamic linking to Setka CDN <a href="#h_d3b0c757-c506-4c10-b9b9-079323da2e4e" id="h_d3b0c757-c506-4c10-b9b9-079323da2e4e"></a>

You can receive links to resources via API and save them to your database. Dynamically link resources to editor and preview pages. Update the links once there is a request for it.&#x20;

{% hint style="danger" %}
Do not send Style Manager API requests each time you open your post. There are two cases when files can be changed:

1\. When updating styles through Style Manager

2\. When a new version of the editor is released

We recommend saving links in a database and updating them only if it is necessary. **On getting a new set of files from editor.setka.io, make sure that it is valid**. Delete the old style file and connect the new one only after validation.&#x20;
{% endhint %}

### 2. Storing resources on your server or CDN <a href="#h_a9eb7ae1-0d52-464f-8897-3ef39250ec5b" id="h_a9eb7ae1-0d52-464f-8897-3ef39250ec5b"></a>

If you want Setka Editor files to be grabbed from your server or CDN, with no dependencies on Setka CDN, you can use links to download them and put them into a public directory of the project. Then you will be able to markup paths to files on required pages.

After the file update request ([Step 4](https://editor-help.setka.io/hc/en-us/articles/115002594605-Integration-with-Style-Manager#h_2284237e-db5e-409e-ae2b-a57dae65308b)), you will need to download new versions and replace old files.

Files can be saved to your server or CDN:

| **File**           | **Description**                              |
| ------------------ | -------------------------------------------- |
| theme\_files       | JSON config file and a concatenated CSS file |
| standalone\_styles | Standalone styles                            |
| amp\_styles        | AMP styles                                   |
| fonts              | Custom fonts                                 |
| icons              | Icons                                        |

Download custom fonts and icons to your server or CDN in any structure preferable for you.

#### After files download: <a href="#h_1747417a-353c-433b-bc65-c4f0e97fee04" id="h_1747417a-353c-433b-bc65-c4f0e97fee04"></a>

1\. JSON config file: replace absolute paths that are referred to a Setka Editor domain with the absolute paths to icons on your domain or CDN

**Example:**

If the path leads to `https://ceditor.setka.io/clients/client-ID/css/assets/file-ID/img/icon.svg`,  replace it with `https://yourdomain.com/assets/icons/icon.svg`*.*

2\. Replace absolute paths for fonts in a concatenated or separate CSS file with the ones that lead to your CDN instead of the Setka Editor domain

**Example:**

If the path leads to `https://ceditor.setka.io/clients/file-ID/css/assets/fonts/client-ID/font.woff`, replace it with `https://yourdomain.com/assets/fonts/font.woff`.
