Reference Source
import {FileUploader} from './assets/fileUploader.js'
public class | source

FileUploader

Thin wrapper around UIKits Upload Component

Constructor Summary

Public Constructor
public

Constructor which initializes fileuploader events

Member Summary

Public Members
public

Method Summary

Public Methods
public

init(progressBar: HTMLElement, uploadField: HTMLElement)

Wire UIKit upload together

public

on(event: string, cb: Function)

Attach listeners

public

trigger(eventName: string, args: Array | object)

Trigger an event with given args

Public Constructors

public constructor() source

Constructor which initializes fileuploader events

Public Members

public events: object source

Public Methods

public init(progressBar: HTMLElement, uploadField: HTMLElement) source

Wire UIKit upload together

Params:

NameTypeAttributeDescription
progressBar HTMLElement

Progressbar element

uploadField HTMLElement

Upload Inputfield

public on(event: string, cb: Function) source

Attach listeners

Params:

NameTypeAttributeDescription
event string

The event you want to bind to

cb Function

The callback to call

public trigger(eventName: string, args: Array | object) source

Trigger an event with given args

Params:

NameTypeAttributeDescription
eventName string
args Array | object

The arguments to pass