Skip to main content

UploadFile

type UploadFile = Blob | Uint8Array;

File content accepted by the upload helpers.

  • Blob/File — browser, or any runtime with a global Blob (Node 18+).
  • Uint8Array — raw bytes (requires fileName). A Node Buffer is a Uint8Array, so reading a file with fs and passing the result works without conversion.

Both are universal types, so the published .d.ts stays free of Node-only globals (Buffer, NodeJS.*) and the helper pulls in no Node built-ins — keeping the browser bundle clean.