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.
Reads a single
Fileand resolves with its base64-encoded content (the data-URL payload after thedata:...;base64,prefix).Ported from
luv-autoq-frontend'sFileHelperclass - simplified to a plain function. The original class took an optionalFile[]in its constructor purely to feedconvertFilesToBase64(); that's expressed directly asPromise.all(files.map(convertFileToBase64))below instead, with no state or instance needed.