Skip to main content

Upload

WATCH & LEARN0:49 · Animated tutorial
7 scenesPlay, pause, or scrub at your own pace

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 an HttpFileCollection.

info

For a complete list of properties, methods, and events, see the API documentation.

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

warning

The CaptureMode property works better on mobile devices; if your device is a desktop computer, you'll likely get a typical file picker.

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

info

The property takes its value as a string containing one or more unique file type specifiers, separated by commas.

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

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

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

Advanced​

JavaScript Widget​

ItemDescription
Class name"wisej.web.Upload"
Theme appearance"upload", see Themes.
Child components"button" is the upload button. "textfield" is the section of the control that holds the file names.
Source codehttps://github.com/iceteagroup/wisej-js