Skip to main content

Interface: FileUploadOptions

Hierarchy

Properties

contentType

Optional contentType: string

Specifies given Content-Type so when loaded in browser the file is correctly represented.

see Bee API reference - POST /bzz

Defined in

bee-js/src/types/index.ts:232


deferred

Optional deferred: boolean

Determines if the uploaded data should be sent to the network immediately (eq. deferred=false) or in a deferred fashion (eq. deferred=true).

With deferred style client uploads all the data to Bee node first and only then Bee node starts push the data to network itself. The progress of this upload can be tracked with tags. With non-deferred style client uploads the data to Bee which immediately starts pushing the data to network. The request is only finished once all the data was pushed through the Bee node to the network.

In future there will be move to the non-deferred style and even the support for deferred upload will be removed from Bee itself.

default true

Inherited from

UploadOptions.deferred

Defined in

bee-js/src/types/index.ts:216


encrypt

Optional encrypt: boolean

Will encrypt the uploaded data and return longer hash which also includes the decryption key.

Warning! Not allowed when node is in Gateway mode!

see Bee docs - Store with Encryption

see Bee API reference - POST /bzz

see Reference

Inherited from

UploadOptions.encrypt

Defined in

bee-js/src/types/index.ts:195


fetch

Optional fetch: Fetch

User defined Fetch compatible function

Inherited from

UploadOptions.fetch

Defined in

bee-js/src/types/index.ts:128


pin

Optional pin: boolean

Will pin the data locally in the Bee node as well.

Locally pinned data is possible to reupload to network if it disappear.

Warning! Not allowed when node is in Gateway mode!

see Bee docs - Pinning

see Bee API reference - POST /bzz

Inherited from

UploadOptions.pin

Defined in

bee-js/src/types/index.ts:184


retry

Optional retry: number

Configure backoff mechanism for requests retries. Specifies how many retries will be performed before failing a request. Retries are performed for GET, PUT, HEAD, DELETE, OPTIONS and TRACE requests. Default is 2.

Inherited from

UploadOptions.retry

Defined in

bee-js/src/types/index.ts:123


size

Optional size: number

Specifies Content-Length for the given data. It is required when uploading with Readable.

see Bee API reference - POST /bzz

Defined in

bee-js/src/types/index.ts:225


tag

Optional tag: number

Tags keep track of syncing the data with network. This option allows attach existing Tag UUID to the uploaded data.

see Bee API reference - POST /bzz

see Bee docs - Syncing / Tags

link Tag

Inherited from

UploadOptions.tag

Defined in

bee-js/src/types/index.ts:204


timeout

Optional timeout: number

Timeout of requests in milliseconds

Inherited from

UploadOptions.timeout

Defined in

bee-js/src/types/index.ts:115