Interface: FileUploadOptions
Hierarchy
↳
FileUploadOptions
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
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
Defined in
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
Defined in
fetch
• Optional
fetch: Fetch
User defined Fetch compatible function
Inherited from
Defined in
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 API reference - POST /bzz
Inherited from
Defined in
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
Defined in
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
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
link
Tag
Inherited from
Defined in
timeout
• Optional
timeout: number
Timeout of requests in milliseconds