Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Upload

Implementation of the 'upload' markup element. Multiple HTML elements are used to create an upload drop area. For CSS manipulations the following classes are added: lto-upload-error-label: text for error messages lto-upload-file-label: upload file text lto-upload-file-extension-label: file extension text label lto-upload-size-label: file size text label lto-upload-text-label: upload file text label lto-upload: general CSS upload class

see

IRenderable

Hierarchy

  • Upload

Implements

Index

Constructors

constructor

Properties

Private dropArea

dropArea: HTMLDivElement = document.createElement("div")

Private errorSpan

errorSpan: HTMLSpanElement = document.createElement("span")

Private fileSpan

fileSpan: HTMLSpanElement = document.createElement("span")

Private spec

Methods

Private compressImage

  • compressImage(file: File): Promise<File>

doValidateAndGetBase64

  • doValidateAndGetBase64(file: File): void

doValidateCompressAndGetBase64

  • doValidateCompressAndGetBase64(file: File): void

removeSuccessClass

  • removeSuccessClass(): void

render

  • render(renderer: IRenderer, isNested: boolean): HTMLElement

setDataToValue

  • setDataToValue(data: string, file: File): void

setErrorSpanTo

  • setErrorSpanTo(text: string): this

setFileNameToSpan

  • setFileNameToSpan(name: string): this

setSuccessClass

  • setSuccessClass(): void

validateFile

  • validateFile(size: number, extension?: undefined | string): boolean

Generated using TypeDoc