> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/reference/working-with-components/aws-s3-uploader.md).

# S3 file uploader

## Overview

*Upload to S3* is a button to upload files to Amazon S3. The uploader allows you to set ACL and specify file type restrictions and MIME types.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FKnrUyBG5it2BD7v77KOE%2FCleanShot%202025-08-22%20at%2013.44.45%402x-min.png?alt=media&amp;token=189a3c4f-1994-4657-bd5b-255ce7f4f4be" alt=""><figcaption></figcaption></figure>

### Properties

<table><thead><tr><th width="196.74609375">Name</th><th width="96.07421875">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>Component name</td></tr><tr><td><code>lastUploadedFileUrl</code></td><td><code>string</code></td><td>S3 URL of the last uploaded file</td></tr><tr><td><code>lastUploadedFileName</code></td><td><code>string</code></td><td>Name of the last uploaded file</td></tr></tbody></table>

### Triggers

<table><thead><tr><th width="173.5625">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Upload Success</strong></td><td>Triggered when a file is successfully uploaded</td></tr></tbody></table>

## Working with the component

If you are planning to use the S3 file uploader in UI Bakery, you first need to [connect your Amazon S3 as a data source](/reference/data-sources/amazon-s3.md) and [set up **CORS policies**](/reference/data-sources/amazon-s3.md#allowing-cors-for-s3-file-upload) for your bucket.

### To upload files to S3:

1. Add the **S3 file uploader** component to the working area.
2. Select the necessary *S3 data source* from the dropdown, specify the bucket, and set up other required settings.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FzvHytE73Dj5VbkeG5HDx%2FCleanShot%202025-02-05%20at%2012.39.11%402x-min.png?alt=media&amp;token=9fef3a7f-63fa-4947-b3c2-f954b1425dec" alt=""><figcaption></figcaption></figure>

3. Next, click on the component and select the necessary file to upload it.

Once it's uploaded, you will notice that the `lastUploadedFileUrl` is an S3 URL, and you can refer to it with the `{{ui.s3FileUploader.lastUploadedFileUrl}}` variable.

Also, If you need to call any action upon the file upload, you can use the **On Upload Success** trigger of the component.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uibakery.io/reference/working-with-components/aws-s3-uploader.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
