Interface FileMetadata

interface FileMetadata {
    fileName: string;
    content: Buffer;
    contentType?: string;
    path?: string;
    fileUuid?: string;
    CID?: string;
}

Properties

fileName: string
content: Buffer
contentType?: string

File MIME type

path?: string

Virtual file path. Empty for root. Must not contain fileName.

The path field can be used to place file in virtual directories inside a bucket. If directories do not yet exist, they will be automatically generated.

For example, an images/icons path creates images directory in a bucket and icons directory inside it. File will then be created in the icons directory.

fileUuid?: string

The file's UUID, obtained after uploadig

CID?: string

The file's CID on IPFS