> For the complete documentation index, see [llms.txt](https://docs.servoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.servoy.com/guides/develop/application-design/ui-components/media/fileupload.md).

# File upload

Single file upload component. File content will be saved in the dataprovider.

{% hint style="info" %}
*<mark style="color:blue;">**Content under construction**</mark>*
{% endhint %}

## Table of contents

* [Getting uploaded file name and mime type](#getting-uploaded-file-name-and-mime-type)
* [File upload properties](#file-upload-properties)
* [File upload events](#file-upload-events)

## Getting uploaded file name and mime type

To get the name and mime type of the uploaded file, you need to create form variables, on the component's parent form, with the following names, 'dataprovider\_filename' and 'dataprovider\_mimetype', where 'dataprovider' is the dataprovider name of the component. These form variables will be filled with the right values after the file is uploaded. Ex.: you have a fileupload component, with dataprovider : 'picture', after the upload, if the form variables 'picture\_filename' and 'picture\_mimetype' exits, they will have the uploaded file name and mime type.

## File upload properties

File upload properties can be found [here](https://github.com/Servoy/gitbook/blob/master/guides/develop/application-design/ui-components/media/broken-reference/README.md).

## File upload events

File upload events can be found [here](https://github.com/Servoy/gitbook/blob/master/guides/develop/application-design/ui-components/media/broken-reference/README.md).

## Related Articles

The following articles are recommended for additional reading

* [File upload Reference Documentation](https://github.com/Servoy/gitbook/blob/master/guides/develop/application-design/ui-components/media/broken-reference/README.md)
* [Styling and Themes](/guides/develop/application-design/styling-and-themes.md)
* [Scripting the UI](/guides/develop/programming-guide/scripting-the-ui.md)


---

# 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.servoy.com/guides/develop/application-design/ui-components/media/fileupload.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.
