@polargold/pg-frontend-core
    Preparing search index...

    Function convertFileToBase64

    • Reads a single File and resolves with its base64-encoded content (the data-URL payload after the data:...;base64, prefix).

      Ported from luv-autoq-frontend's FileHelper class - simplified to a plain function. The original class took an optional File[] in its constructor purely to feed convertFilesToBase64(); that's expressed directly as Promise.all(files.map(convertFileToBase64)) below instead, with no state or instance needed.

      Parameters

      • file: File

      Returns Promise<string>