> For the complete documentation index, see [llms.txt](https://docs.wisej.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/docs/controls/content/upload.md).

# Upload

The `Upload` control allows users to select files from their local machine and upload them to the server. The files are available in the `Uploaded` event as a `HttpFileCollection`.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Capture Mode

The `CaptureMode` property contains several configuration options for defining the type of user input:

* `Default`: The default upload configuration.
* `User`: Specifies that the upload operation should show a user-facing camera and microphone.
* `Environment`: Specifies that the upload operation should show an environment-facing camera and microphone.

![Upload control showing capture mode options](/files/-MeAzWLdyFiq4Bge-Omg)

{% hint style="warning" %}
The `CaptureMode` property works better on mobile devices; if your device is a desktop computer, you'll likely get a typical file picker.
{% endhint %}

### Filter File Types

The `AllowedFileTypes` property of the `Upload` control specifies the required media types for file selection.

Some examples include:

* `audio/*`: Meaning "any audio file"
* `video/*`: Meaning "any video file"
* `image/*`: Meaning "any image file"

![Upload control with AllowedFileTypes set to image/\* showing file type filtering](/files/-MeAyVGP9JKUOKiMSDqa)

{% hint style="info" %}
The property takes its value as a string containing one or more unique file type specifiers, separated by commas.
{% endhint %}

### Multiple File Selection

When the `AllowMultipleFiles` property is set to `true`, more than one file can be selected for upload.

![Upload control demonstrating multiple file selection capability](/files/-MeAzoD2dmwulsUJnNLg)

## How To

### Customize the Appearance

The `Upload` control can be customized using the `AppearanceKey`, `Font`, and `Color` properties.

#### Appearance Key

The `Upload` control can be customized to show any predefined theme appearance by setting the `AppearanceKey` property.

#### Font

Like most other controls in Wisej.NET, the `Upload` control has a `Font` property that allows for customization of the size, features, and style of font.

![Upload control showing custom font settings](/files/-MgfwzBPoqSnuBmSH9_u)

#### Color Properties

The `Upload` control has a `ForeColor` and `BackColor` property that can specify the color for the text and container, respectively.

![Upload control demonstrating color customization options](/files/-MgfwJ7prmBxqbupmktQ)

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| Class name       | "wisej.web.Upload"                                                                                                  |
| Theme appearance | "upload", see [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements).                               |
| Child components | "button" is the upload button. "textfield" is the section of the control that holds the file names.                 |
| Source code      | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js) |


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/docs/controls/content/upload.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
