# File Storage Helper

<figure><img src="/files/Vq5qU5ZTCIOdtfehssx3" alt="" width="177"><figcaption></figcaption></figure>

## Overview

Using the **File Storage Helper**, you can store and save all kinds of files (CSV, XML, Excel, txt, etc.) to the Locoia app file system (S3 instance). From there, you can download those files using the URL you will receive as a result.

## Actions

### 1. Upload and publish files publicly accessible

This action takes a reference or a URL of the file and returns a publicly accessible URL.\
See an example of how a file `cars_csv` from the previous step is published and made publicly accessible:

{% hint style="info" %}
All other files in the Locoia ecosystem cannot be publicly accessed.
{% endhint %}

<figure><img src="/files/p3AKxYIeqYxosSAOmoeT" alt=""><figcaption></figcaption></figure>

### 2. Store a file privately for later use in flows

This action takes a reference or a URL of the file and stores it privately.\
See an example of how a file `cars_csv` from the previous step is stored with a new Filename `car_manufactures`

<figure><img src="/files/tVjjeeL33WaL28IpGBJj" alt=""><figcaption></figcaption></figure>

### 3. Retrieve stored file for use in flows

This action takes a Filename and returns a URL where the file is privately stored.\
Retrieve a file by name `car_manufactures`:

<figure><img src="/files/1daFrJYktoe0POMAh9ge" alt=""><figcaption></figcaption></figure>

### 4. Create File

Creates a file with the desired name, content, and content type.&#x20;

You can provide content in either text (**plain**) format or Base64 decoded format. If the content is a base64 encoded string set the optional parameter **Optional encoding of the content** to **base64** and set the **Content type of the file** field based on the content type of the file that should be created.

<figure><img src="/files/MiMJ5FpUpr7ciWSH92jo" alt="" width="563"><figcaption></figcaption></figure>

## Common use-cases File Storage Helper

* Including a link rather than a file in an email
* posting a file (e.g. JPG image file or pdf file) against another API to upload it
* Create a file based on a text string (e.g. an XML file) or a base64 encoded file


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.locoia.com/connectors/helpers/file-storage-helper.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
