ducjs - v4.4.2
    Preparing search index...

    Function uint8ArrayToFile

    • Converts a Uint8Array to a browser File object.

      Parameters

      • bytes: Uint8Array

        The Uint8Array containing the binary data of the file.

      • fileName: string

        The desired name for the file, including its extension (e.g., "thumbnail.png").

      • options: { lastModified?: number; mimeType?: string } = {}

        Optional settings for the file.

        • OptionallastModified?: number

          The timestamp (milliseconds since epoch) for the file's last modified date. Defaults to the current time.

        • OptionalmimeType?: string

          The MIME type of the file (e.g., "image/png"). Defaults to "application/octet-stream".

      Returns File

      A File object.