Class: Uploader

Uploader

Class used for uploading images.

Constructor

new Uploader(options)

Creates an Uploader instance with parameters passed as an object.

Available parameters are:

  • exceptions {function}: the exceptions handler to use, function that takes a string.
  • input {HTMLElement} (required): the file input element. Instantiation fails if not provided.
  • types {array}: the file types accepted by the uploader.
Parameters:
Name Type Description
options object the parameters to be passed for instantiation
Source:

Methods

listen()

Listen for an image file to be uploaded, then validate it and resolve with the image data.
Source: