> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/norbix-cloud/files-service.md).

# Files

<figure><img src="/files/izQ8PdiKGeWpBjsh76N0" alt=""><figcaption><p>The Files module home — cloud storage for your project.</p></figcaption></figure>

Norbix **Files** service allows you to store all your project files. These files include files from the database, user files, and custom files. All the files can be seen from the dashboard in the file browser.

To start using **Files** services and [API](https://docs.norbix.ai/sdks) methods you firstly need to enable files service in your Norbix dashboard.

Features included in files service:

1. File storage - storing your project files.

## Using SDK

If you decide to use one of our provided SDK, the following code shows how to initialize files service.

{% tabs %}
{% tab title=".NET" %}

```csharp
var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
var apiKey = "{YOUR_SECRET_KEY}";

var client = new NorbixClient(apiKey, projectId);
var filesService = new NorbixFilesService(client);
```

{% endtab %}

{% tab title="Node" %}

```
```

{% endtab %}

{% tab title="PHP" %}

```php
use Norbix\NorbixClient;
use Norbix\NorbixFile;

class NorbixService
{
    protected NorbixFile $norbixFile;

    public function __construct()
    {
        $secretKey = '{YOUR_SECRET_KEY}';
        $projectId = '{YOUR_PROJECT_ID}';

        $client = new NorbixClient($secretKey, $projectId);
        $this->norbixFile = new NorbixFile($client);
    }
}
```

{% endtab %}
{% endtabs %}

## Example

The following are examples of files SDK using different languages and frameworks.

{% tabs %}
{% tab title=".NET" %}

```csharp
using System;
using Norbix.Client;
using Norbix.Membership.Services;
using Isidos.Norbix.ServiceContracts;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            // 1. Get your Project ID and Secret Key
            var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
            var apiKey = "{YOUR_SECRET_KEY}";

            // 2. Create a general client for API calls
            var client = new NorbixClient(apiKey, projectId);
            
            // 3. Create a service object
            var filesService = new NorbixFilesService(client);

            // 4. Get path to your file
            var directory = Path.GetDirectoryName(
                Assembly.GetExecutingAssembly().Location
            );
            var filePath = $"{directory}\\test.txt";
            
            // 5. Get file stream
            using (var fsSource = new FileStream(path, FileMode.Open, 
                FileAccess.Read))
            {
                // 6. Call an API method
                var response = await filesService.UploadFileAsync(
                    fsSource, 
                    "test.txt", 
                    new UploadFileRequest
                    {
                        Path = "folder1"
                    }
                );
            }
        }
    }
}
```

{% endtab %}

{% tab title="Node" %}

```
```

{% endtab %}

{% tab title="PHP" %}

```php
use Norbix\NorbixClient;
use Norbix\NorbixFile;

class NorbixService
{
    protected NorbixFile $norbixFile;

    public function __construct()
    {
        $secretKey = '{YOUR_SECRET_KEY}';
        $projectId = '{YOUR_PROJECT_ID}';

        $client = new NorbixClient($secretKey, $projectId);
        $this->norbixFile = new NorbixFile($client);
    }

    public function uploadFile()
    {
        $responseData = $norbixFile->uploadRecordFile([
            'fileUri' => '{YOUR_FILE_PATH}',
            'fileName' => '{YOUR_FILE_NAME}',
            'collectionName' => '{COLLECTION_NAME}',
            'recordId' => '{RECORD_ID}',
            'uniqueFieldName' => 'file_field_name',
        ]);
    }
}
```

{% endtab %}
{% endtabs %}

## Working with Files Service

The following links explore the usage of files service:

{% content-ref url="/pages/-LyQYc1gl-gPGs2XDOIQ" %}
[Broken mention](broken://pages/-LyQYc1gl-gPGs2XDOIQ)
{% endcontent-ref %}

***

## Use it from code

Everything you can do on this screen is also available programmatically — same module, same permissions, same audit trail.

| Channel      | Where to go                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **SDKs**     | [JavaScript / TypeScript](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/javascript-typescript.md) · [Python](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/python.md) · [.NET](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/net.md) · [Go](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/go-lang.md) · [Dart / Flutter](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/flutter.md) · [Swift](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/swift.md) · [Kotlin](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/kotlin.md) · [React / Redux](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/react-redux.md) |
| **REST API** | [Files API](https://github.com/Isidos-co/codemash-docs/tree/main/api/files.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **AI / MCP** | Work with this module from Claude, Cursor, or any AI tool — see [MCP Server](/ai/mcp-server.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
