Uploader

Version: 9.0

An Uploader control enables users to select and upload media files. The Uploader control displays an area where users can drag and drop the files from their local computer that they want to upload to the media library. “Drag and drop” does not work in all browsers on all platforms, and local security settings can also disable it. The Uploader control offers a more traditional alternative to “drag and drop”: a button that users can click to open a file selection dialog box.

The Uploader control provides users with a way to select files and a member function to upload selected files. You can raise the upload event from a button to trigger this function. Users can then upload selected files by clicking the button.

The Uploader control uploads all currently selected files. The collection of selected files is empty after an upload. The collection of selected files is also empty if the user leaves or refreshes the page.

You can use the UploaderInfo control to display information about the currently selected files.

Properties

Name

Description

Default

Appearance

BrowseButtonText

Specify the text that the browse button displays.

‘Browse for media files’

ShortDescriptionText

Specify the text that the control displays on a label above the browse button.

‘Drag and drop files here’

Data

Database

Specify the database that the Uploader control uploads files to:

  • The exact name of a database, for example, core, or master.

  • $context_database: context database.

  • $context_contentdatabase: content database.

The context database.

DestinationUrl

Specify the folder where the Uploader control puts files that it uploads, for example: /sitecore/media library/Uploader.

/sitecore/media library

Configuration

You can create a configuration item for an Uploader control by creating an item based on the Uploader Parameters template.

The configuration item has these specific fields:

  • Database

It inherits these fields:

  • IsVisible

  • AccessKey

  • Tooltip

  • Behaviors

  • Id

Do you have some feedback for us?

If you have suggestions for improving this article,