# Uploading and deleting local files

For a local file dataset, you upload and remove new files directly.

On Tonic Textual Cloud, and by default for self-hosted instances, Textual stores the uploaded files in the application database.

On a self-hosted instance, you can instead configure an S3 bucket where Textual stores the files. In the S3 bucket, the files are stored in a folder that is named for the dataset identifier.

For more information, go to [Setting the S3 bucket for file uploads and redactions](/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/textual-config-pipeline-upload.md).&#x20;

For an example of an IAM role with the required permissions, go to [Required IAM role permissions for Amazon S3](/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/pipelines-example-iam-roles.md#file-upload-example-iam-role).

## Adding files to the dataset <a href="#textual-dataset-add-files" id="textual-dataset-add-files"></a>

{% hint style="info" %}
**Required dataset permission:** Upload files to a dataset
{% endhint %}

From the dataset details page, to add files to the dataset:

1. In the left menu, click **Project files**.
2. On the dataset files page, click **Upload Files**.

<figure><img src="/files/I0iE3xXDXJszfOlT18JN" alt=""><figcaption><p>Dataset files list with the upload option</p></figcaption></figure>

2. Search for and select the files.

Textual uploads and then processes the files. For more information about file processing, go to [Tracking and managing file processing](/textual/dataset-files/tracking-and-managing-file-processing.md).

{% hint style="info" %}
Do not leave the page while files are uploading. If you leave the page before the upload is complete, then the upload stops.

You can leave the page while Textual is processing the file.
{% endhint %}

On a self-hosted instance, when a file fails to upload, you can download the associated logs. To download the logs, click the options menu for the file, then select **Download Logs**.

## Removing files from the dataset <a href="#textual-dataset-remove-files" id="textual-dataset-remove-files"></a>

{% hint style="info" %}
**Required dataset permission:** Delete files from a dataset
{% endhint %}

To remove a file from the dataset:

<figure><img src="/files/OSp48iTbYcXOl0jmDs7F" alt=""><figcaption><p>Options menu for a dataset file</p></figcaption></figure>

1. In the file list, click the options menu for the file.
2. In the options menu, click **Delete 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.tonic.ai/textual/dataset-files/files-local.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.
