Skip to main content

Namespace: Upload

@web3-storage/upload-client.Upload

Functions

add

add(conf, root, shards, options?): Promise<UploadAddResponse>

Register an "upload" with the service. The issuer needs the upload/add delegated capability.

Required delegated capability proofs: upload/add

Parameters

NameTypeDescription
confInvocationConfigConfiguration for the UCAN invocation. An object with issuer, with and proofs. The issuer is the signing authority that is issuing the UCAN invocation(s). It is typically the user agent. The with is the resource the invocation applies to. It is typically the DID of a space. The proofs are a set of capability delegations that prove the issuer has the capability to perform the action. The issuer needs the upload/add delegated capability.
rootUnknownLinkRoot data CID for the DAG that was stored.
shardsCARLink[]CIDs of CAR files that contain the DAG.
options?RequestOptions

Returns

Promise<UploadAddResponse>

Defined in

packages/upload-client/src/upload.js:30


list

list(conf, options?): Promise<ListResponse<UploadListResult>>

List uploads created by the issuer.

Parameters

NameTypeDescription
confInvocationConfigConfiguration for the UCAN invocation. An object with issuer, with and proofs. The issuer is the signing authority that is issuing the UCAN invocation(s). It is typically the user agent. The with is the resource the invocation applies to. It is typically the DID of a space. The proofs are a set of capability delegations that prove the issuer has the capability to perform the action. The issuer needs the upload/list delegated capability.
options?ListRequestOptions

Returns

Promise<ListResponse<UploadListResult>>

Defined in

packages/upload-client/src/upload.js:85


remove

remove(conf, root, options?): Promise<undefined | UploadRemoveResponse & {}>

Remove an upload by root data CID.

Parameters

NameTypeDescription
confInvocationConfigConfiguration for the UCAN invocation. An object with issuer, with and proofs. The issuer is the signing authority that is issuing the UCAN invocation(s). It is typically the user agent. The with is the resource the invocation applies to. It is typically the DID of a space. The proofs are a set of capability delegations that prove the issuer has the capability to perform the action. The issuer needs the upload/remove delegated capability.
rootUnknownLinkRoot data CID to remove.
options?RequestOptions

Returns

Promise<undefined | UploadRemoveResponse & {}>

Defined in

packages/upload-client/src/upload.js:134