Media Upload

Overview

The Media Upload control collects files from users. This Control prompts the user to select an item for upload and return an asset reference to the uploaded asset. The final result is a List of Assets.

organizing info

Control Properties

Type

The type of asset to accept. The default choices are Images, PDF, and video. If required to accept multiple types, add the asset types as an expression in quotes. 

For example: 

"image/jpeg, image/png, application/pdf, image/svg+xml, image/gif, audio/mpeg, video/mp4"

linkExpiration

The amount of time the asset should be available in milliseconds (integer).

This property is only valid on Assets with a visibility of type Private, and providing a value for this property will automatically make the uploaded Asset Private.

If the Link Expiration property is left blank, the Asset will be a global Asset. 

Check out the Asset Data Type for further information on the expiration of assets. 

imageSize

The asset input allows for resizing of assets as they are uploaded. This property is an object representing the width and height in pixels for the uploaded asset:

{ width: number, height: number }

thumbnailPlaceholderSrc

A URL to a placeholder image to be used while the asset is uploaded before a preview can be generated.

Note: because Airkit Apps are hosted from a secure, HTTPS, resource, all hosted images must be hosted on a secure site.

Control Actions

Value Changed

This event occurs every time the assets are contained within the associated asset list. Whether an item is added by the user uploading a new asset or one is removed by a user removing an asset via the delete button.

Styling and Theming

The Asset Input Web Control is a compound control containing many containers and labels. Each of the components is stylable based on the styles available to that component. To style, select the Asset Input in the Tree view. Under style selected, the component of the asset control to style and the style properties will appear in a popup.

organizing info

Examples

Example 1: Signed PDF Input

An Asset Input can collect PDFs from users. Insert an Asset Input control into a Data Flow and set the Type to:

application/pdf
organizing info