# Cloud Integration for Files

### Cloud Integration for Files

When you configure a [File Job](https://docs.tricloudnexus.io/management-portal/designer/assets/jobs/file-job), [FTP Job](https://docs.tricloudnexus.io/management-portal/designer/assets/jobs/ftp-job), or [File Share Job](https://docs.tricloudnexus.io/management-portal/designer/assets/jobs/file-share-job) in Tricloud Nexus and choose the option **Send files to Cloud**, the selected files are automatically uploaded to your environments **Ingestion Storage Account**. This makes it simple to centralize, archive, or further process files collected at the Edge -without any manual file transfers or additional integration work.

***

### Cloud Storage Location

All files sent to the cloud are placed in the **files-drop** container of your configured ingestion storage account. By default, every Tricloud Nexus installation includes an ingestion storage account that is fully managed by the platform.

The exact path within the **files-drop** container is determined by your job settings. For example:

```
<ingestion_storage_account>/files-drop/<deviceid>/<jobname>/<your-subfolder-structure>/<filename>
```

{% hint style="info" %}
The default storage account use for ingestion of data from all devices can be found in [Platform Settings/Endpoints](https://docs.tricloudnexus.io/management-portal/platform-settings/endpoints). Look for the Endpoint that has type 'Ingestion'.&#x20;

**Note**: The default ingestion storage account can also be configured for each individual device in the [device settings](https://docs.tricloudnexus.io/management-portal/management/device-configuration/settings)&#x20;
{% endhint %}

***

### Example storage location

Suppose you have an Edge device named `sesam-device-dallas` and a File Job named `MoveLabFtpFiles`.  If you specify a `${deviceid}`token as **Destination Folder,** files will be uploaded to:

```
files-drop/sesam-device-dallas/MoveLabFtpJob/<filename>
```

You can further structure the destination path using **directory tokens** as specified below (e.g., `${deviceid}/$(yyyy)`), which automatically resolve to dynamic values such as the Edge device name, job name, or current date, current year etc. This allows for highly organized and easily searchable cloud file storage.

| $(deviceid) | Replace a part of a filepath with the Device Id of the Edge device using the token $(deviceid).                                                        | <p>rootfolder/$(deviceid)/otherfolder<br><br>rootfolder/EdgeDevice-1/otherfolder</p> |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| $(yyyy)     | Replace a part of a filepath with the current Year UTC (Eg. 2021) using the token $(yyyy).                                                             | <p>rootfolder/$(yyyy)/otherfolder<br><br>rootfolder/2021/otherfolder</p>             |
| $(MM)       | Replace a part of a filepath with the current Month UTC (Eg. 01-12) using the token $(MM).                                                             | <p>rootfolder/$(MM)/otherfolder<br><br>rootfolder/07/otherfolder</p>                 |
| $(dd)       | Replace a part of a filepath with the current Day of month UTC (Eg. 01-31) using the token $(dd).                                                      | <p>rootfolder/$(dd)/otherfolder<br><br>rootfolder/07/otherfolder</p>                 |
| $(HH)       | Replace a part of a filepath with the current UTC hour (Eg. 00-24) using the token $(HH).                                                              | <p>rootfolder/$(HH)/otherfolder<br><br>rootfolder/13/otherfolder</p>                 |
| $(mm)       | Replace a part of a filepath with the current UTC minute (Eg. 00-59) using the token $(mm).                                                            | <p>rootfolder/$(mm)/otherfolder<br><br>rootfolder/57/otherfolder</p>                 |
| $(ss)       | Replace a part of a filepath with the current UTC Second (Eg. 00-59) using the token $(ss).                                                            | <p>rootfolder/$(ss)/otherfolder<br><br>rootfolder/35/otherfolder</p>                 |
| $(FFF)      | Replace a part of a filepath with the current UTC MilliSecond (Eg. 000-999) using the token $(FFF).                                                    | <p>rootfolder/$(FFF)/otherfolder<br><br>rootfolder/358/otherfolder</p>               |
| $(unixts)   | Replace a part of a filepath with the current Unix Timestamp UTC (Number of milliseconds that has elapsed since 1970-01-01) using the token $(unixts). | <p>rootfolder/$(unixts)/otherfolder<br><br>rootfolder/1629098246320/otherfolder</p>  |

***

### How it works

* **Automatic Upload:** When the job runs and finds files to process, they are copied or moved to the ingestion storage account in the cloud.
* **Reliable Delivery:** Files are buffered and retried automatically if the network is temporarily unavailable.
* **Separation of Concerns:** Each device and job writes to its own subfolder, preventing file conflicts and ensuring traceability.

#### Best Practices

* **Consistent Naming:** Use clear and consistent job and device names to make finding files easy.
* **Use Tokens for Dynamic Folders:** Take advantage of folder tokens (such as `${deviceid}`) for automatic organization.
* **Monitor Ingestion:** You can track successful uploads and job execution logs from the File Transfer Module or Jobs tab.
* **Retention & Processing:** Once in the cloud, files can be processed further by downstream analytics, business intelligence tools, or long-term archiving solutions.

#### Summary&#x20;

| Setting in Job               | Where files go in cloud                                                      |
| ---------------------------- | ---------------------------------------------------------------------------- |
| No custom folder             | files-drop/\<deviceid>/\<jobname>/\<filename>                                |
| Destination folder: `batch1` | files-drop/\<deviceid>/\<jobname>/batch1/\<filename>                         |
| With tokens: `${deviceid}`   | files-drop/\<deviceid>/\<jobname>/\<dynamic-path-based-on-token>/\<filename> |

{% hint style="info" %}
The default storage account use for ingestion of data from all devices can be found in [Platform Settings/Endpoints](https://docs.tricloudnexus.io/management-portal/platform-settings/endpoints). Look for the Endpoint that has type 'Ingestion'.&#x20;

**Note**: The default ingestion storage account can also be configured for each individual device in the [device settings](https://docs.tricloudnexus.io/management-portal/management/device-configuration/settings)&#x20;
{% endhint %}

***

By leveraging Jobs that Send files to cloud, you can ensure that important documents, reports, and measurement files from the Edge are always available, organized, and ready for enterprise-wide access and processing.
