/auth
Search
K
Comment on page

deleteFile( )

Function to delete a file.

Usage

const { data } = await client.user.deleteFile({
id: 'file.1234',
});
console.log('File name: ', data?.name)

Return Value

{
data?: {
id: string;
blobID: string;
clientID: string;
organizationID?: string;
wallet: string;
name: string;
description?: string;
rolesRequired: string[];
createdAt: string;
updatedAt: string;
};
error: ErrorMessage | null;
headers: Object;
statusCode: number;
}

Configuration

id

String that represents the file ID.
const { data } = await client.user.deleteFile({
id: 'file.1234',
});
console.log('File name: ', data?.name)

organizationID (optional)

String that represents an organizations ID.
const { data } = await client.user.deleteFile({
id: 'file.1234',
organizationID: 'org.abc',
});
console.log('File name: ', data?.name)