• Convert a file-input to a Data-URL

    Parameters

    • fileInput: string | HTMLInputElement

      HTMLInputElement or DOM-selector of the file-input.

    Returns Promise<DataURL | string>

    Returns a promise which can either fail (string with reason) or succeed (DataURL of the file).

    Example

    import { utils } from "@hboictcloud/api";

    try {
    const data = await utils.getDataUrl("#fileInput");

    console.log(data);
    }
    catch(reason) {
    console.log(reason);
    }

Generated using TypeDoc