• Upload a blob to multiple servers

    Uploads the blob to the first server, then mirrors to the remaining servers. Uses parallel preflight checks (HEAD /) to detect which servers already have the blob.

    %%{init:{"theme":"dark"}}%% flowchart LR preflight["HEAD /<sha256>"] --> hasBlob{"Has blob?"} hasBlob -- yes --> mirror["/mirror"] hasBlob -- no --> upload["/upload"] upload -- complete --> next["Next server"] next --> hasBlob mirror --> isMirror{"Successful?"} isMirror -- yes --> next isMirror -- no --> upload
    %%{init:{"theme":"default"}}%% flowchart LR preflight["HEAD /<sha256>"] --> hasBlob{"Has blob?"} hasBlob -- yes --> mirror["/mirror"] hasBlob -- no --> upload["/upload"] upload -- complete --> next["Next server"] next --> hasBlob mirror --> isMirror{"Successful?"} isMirror -- yes --> next isMirror -- no --> upload
    flowchart LR
      preflight["HEAD /<sha256>"] --> hasBlob{"Has blob?"}
      hasBlob -- yes --> mirror["/mirror"]
      hasBlob -- no --> upload["/upload"]
      upload -- complete --> next["Next server"]
      next --> hasBlob
      mirror --> isMirror{"Successful?"}
      isMirror -- yes --> next
      isMirror -- no --> upload

    Type Parameters

    Parameters

    Returns Promise<Map<S, BlobDescriptor>>