# 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 [textual-config-pipeline-upload](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/textual-config-pipeline-upload "mention").&#x20;

For an example of an IAM role with the required permissions, go to [#file-upload-example-iam-role](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/pipelines-example-iam-roles#file-upload-example-iam-role "mention").

## 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="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FOXXOuccctEDWRfjTQJcE%2FDatasetLocalFiles.png?alt=media&#x26;token=ad97ec5a-2b53-481b-ba7e-4435f8c022f2" 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](https://docs.tonic.ai/textual/dataset-files/tracking-and-managing-file-processing "mention").

{% 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="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FuiKdcsjePKHbDeJjHpm2%2FFileOptionsMenu.png?alt=media&#x26;token=ba270028-f795-4101-aa1c-924704f95744" 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**.
