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