# File Picker

## Overview

The File Picker will open your end user's file library and allow them to select a file. The file can then be used in the app.

You can allow your end user to upload any kind of file, or limit their selection by file type, eg. HTML, PDF, etc.

{% hint style="info" %}
Your end users may experience lags or delays if the size of the file the try to upload is larger than 5MB
{% endhint %}

## Blocks

### Functions

#### Get File

![](/files/nYXhprhmXe56v8Pf0APp)

| Input | Description                                              | Data Type                                                 |
| ----- | -------------------------------------------------------- | --------------------------------------------------------- |
| type  | Select the type of file you want your end user to upload | Select from list `[any type of, image, video, html, pdf]` |

<table><thead><tr><th width="150">Output</th><th width="287.76404494382024">Description</th><th>Data Type</th></tr></thead><tbody><tr><td>file</td><td>Points to the file that has been uploaded</td><td>Data type of the file that has been uploaded.<br>Can also return address of the file as text</td></tr><tr><td>name</td><td>Name of the uploaded file</td><td>Text</td></tr><tr><td>mime type</td><td>Describes the type of file in <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME format</a></td><td>Text</td></tr><tr><td>size</td><td>Returns size of uploaded file in bytes</td><td>Number</td></tr><tr><td>was cancelled</td><td>Indicates whether the end user cancelled selecting a file</td><td>True/False</td></tr><tr><td>error</td><td>If there is an error, returns the error. Else returns <code>null</code></td><td>Text</td></tr></tbody></table>


---

# 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.thunkable.com/snap-to-place/file-picker.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.
