Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PutFileOptions

Specify a valid MIME type, encryption options, and whether to sign the UserSession.putFile.

Hierarchy

Index

Properties

Optional cipherTextEncoding

cipherTextEncoding: CipherTextEncoding

String encoding format for the cipherText buffer. Currently defaults to 'hex' for legacy backwards-compatibility. Only used if the encrypt option is also used. Note: in the future this should default to 'base64' for the significant file size reduction.

Optional contentType

contentType: string

Specifies the Content-Type header for unencrypted data. If the encrypt is enabled, this option is ignored, and the Content-Type header is set to application/json for the ciphertext JSON envelope.

Optional dangerouslyIgnoreEtag

dangerouslyIgnoreEtag: boolean

Ignore etag for concurrency control and force file to be written.

Optional encrypt

encrypt: boolean | string

Encrypt the data with the app public key. If a string is specified, it is used as the public key. If the boolean true is specified then the current user's app public key is used.

default

true

Optional sign

sign: boolean | string

If set to true the data is signed using ECDSA on SHA256 hashes with the user's app private key. If a string is specified, it is used as the private key instead of the user's app private key.

default

false

Optional wasString

wasString: boolean

Specifies if the original unencrypted content is a ASCII or UTF-8 string. For example stringified JSON. If true, then when the ciphertext is decrypted, it will be returned as a string type variable, otherwise will be returned as a Buffer.

Generated using TypeDoc