• Creates a Blob URI from the given file.

    Internally it uses URL.createObjectURL and other internals to create a URI that can be referenced by a DOM attribute (e.g. src of an img tag), and at the same time retains some critical information about the file (e.g. its original name).

    Parameters

    • file: File

      a File object as obtained from an input element or a FileList

    Returns string

    a Blob URI as a string