File downloader

Constructors

Methods

  • Downloads file from Axios response

    Parameters

    • response: AxiosResponse<string | object>

      Axios response

    • contentType: string

      MIME content type

    • fileName: string

      Name of downloaded file

    Returns void

  • Downloads file from data

    Parameters

    • data: string | object

      Data to download

    • contentType: string

      MIME content type

    • fileName: string

      Name of downloaded file

    Returns void

  • Creates a new file download element from Axios response

    Parameters

    • response: AxiosResponse<string | object>

      Axios response

    • contentType: string

      MIME content type

    • fileName: string

      Name of downloaded file

    Returns HTMLAnchorElement

    New file download element

  • Creates a new file download element from data

    Parameters

    • data: string | object

      Data to download

    • contentType: string

      MIME content type

    • fileName: string

      Name of downloaded file

    Returns HTMLAnchorElement

    New file download element