backblaze-labs/b2-action - v0.1.0
    Preparing search index...

    Function uploadCommand

    • Upload one or more files to B2.

      Mode selection:

      • If source is a plain file path (no glob metacharacters and the path exists as a regular file), upload that single file. The B2 file name is destination if set; otherwise basename(source).
      • Otherwise treat source (plus any include patterns) as glob(s). Each matched file is uploaded preserving its path relative to the glob root, prefixed by destination (default empty).

      Large files are streamed (StreamSource over a fs ReadStream-as-Web-Stream) so we don't buffer the whole payload in RAM. The SDK's Bucket.upload routes to multipart automatically when size exceeds the recommended part size and parallelizes parts up to concurrency.

      Parameters

      Returns Promise<UploadResult>