Interface IFileUploadRequest

interface IFileUploadRequest {
    wrapWithDirectory?: boolean;
    directoryPath?: string;
    awaitCid?: boolean;
    ignoreFiles?: boolean;
}

Properties

wrapWithDirectory?: boolean

Wrap uploaded files to IPFS directory.

Files in session can be wrapped to CID on IPFS via wrapWithDirectory parameter. This means that the directory gets its own CID and its content cannot be modified afterwards.

directoryPath?: string

Path to wrapped directory inside bucket.

Mandatory when wrapWithDirectory is true.

Example

`main-dir` --> Files get uploaded to a folder named `main-dir` in the bucket.

Example

`main-dir/sub-dir` --> Files get uploaded to a subfolder in the location `/main-dir/sub-dir`.
awaitCid?: boolean

If set to true, the upload action will wait until files receive a CID from IPFS before returning a result

Default

false
ignoreFiles?: boolean

If set to true, will ignore all the files inside the .gitignore file, including .git and .gitignore itself

Default

true