Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Uppload

Uppload image uploading widget

Hierarchy

  • Uppload

Implements

Index

Constructors

  • Create a new Uppload instance

    Parameters

    Returns Uppload

Properties

activeEffect: string = ""
activeService: string = "default"
container: HTMLDivElement
effects: UpploadEffect[] = []
emitter: Emitter<Record<EventType, unknown>> = ...
error?: string
file: IUpploadFile = ...
focusTrap: FocusTrap
inline: boolean = false
isOpen: boolean = false
lang: ILanguage = {}
services: UpploadService[] = ...
transitionDuration: number = 300
uId: string = ""
uploadProgress: number = 0

Methods

  • bind(value: string): void
  • Bind the image URL value to DOM elements

    Parameters

    • value: string

      URL of the image

    Returns void

  • close(): void
  • Close the Uppload widget

    Returns void

  • compress(file: Blob): Promise<Blob>
  • Parameters

    • file: Blob

    Returns Promise<Blob>

  • getEffectsNavbar(): string
  • Returns the HTML template for the effects navbar

    Returns string

  • getNavbar(sidebar?: boolean): string
  • Returns the HTML template for the services navbar

    Parameters

    • sidebar: boolean = false

      Whether this is an input radio (for sidebar) or buttons (for home)

    Returns string

  • handle(error: Error): void
  • Gracefully display an error message

    Parameters

    • error: Error

      Error to display

    Returns void

  • handlers(): void
  • Adds event handlers for the widget

    Returns void

  • hideHelp(): void
  • Returns void

  • Install a new uploader, service, or effect to this instance

    Parameters

    Returns void

  • modalOpen(): boolean
  • Returns whether the modal is currently open

    Returns boolean

  • navigate(service: string): void
  • Navigate to an Uppload service page

    Parameters

    • service: string

      Slug name of service (e.g., instagram)

    Returns void

  • Updates the file and goes to the active effect

    Parameters

    Returns undefined | Promise<string>

  • off(type: string, handler: (event?: any) => void): void
  • Remove an event listener

    Parameters

    • type: string

      Type of event listener (e.g., open)

    • handler: (event?: any) => void

      Event handler function

        • (event?: any): void
        • Parameters

          • Optional event: any

          Returns void

    Returns void

  • on(type: string, handler: (event?: any) => void): void
  • Add an event listener

    Parameters

    • type: string

      Type of event listener (e.g., open)

    • handler: (event?: any) => void

      Event handler function

        • (event?: any): void
        • Parameters

          • Optional event: any

          Returns void

    Returns void

  • open(): void
  • Open the Uppload widget

    Returns void

  • ready(): void
  • Returns void

  • remove(slug: string): void
  • Remove a plugin (effect or serve) from this instance

    Parameters

    • slug: string

      Slug of the plugin to be removed

    Returns void

  • render(): string
  • Render the content inside the widget container

    Returns string

  • Render the currently active effect

    Parameters

    Returns undefined | string

  • renderActiveService(): undefined | string
  • Render the currently active service

    Returns undefined | string

  • renderContainer(): void
  • Renders the main container for the widget

    Returns void

  • showHelp(url: string): void
  • Show the help article for this plugin in a frame

    Parameters

    • url: string

      URL of help webpage

    Returns void

  • stopCurrentService(): void
  • Stops any actions being done by the currently active service For example, if your webcame is being accessed, kill that process

    Returns void

  • toggle(): void
  • Toggles the Uppload widget

    Returns void

  • update(): void
  • Re-render the widget

    Returns void

  • Update the plugins for this instance

    Parameters

    Returns void

  • updateProgress(progressPercent: number): void
  • Updates the upload progress

    Parameters

    • progressPercent: number

      Current progress in percent

    Returns void

  • Update widget settings such as i18n

    Parameters

    Returns void

  • upload(file: Blob | File): Promise<string>
  • Upload a file to the server

    Parameters

    • file: Blob | File

      A Blob object containing the file to upload

    Returns Promise<string>

    The file URL

  • uploadMultiple(file: Blob[]): Promise<any>
  • Uploads multiple files to the server

    Parameters

    • file: Blob[]

    Returns Promise<any>

    JSON response from server

Generated using TypeDoc