Skip to main content

deleteFile()

deleteFile(fileId: string): Promise<void>

Defined in: packages/core/src/index.ts:1674

Delete a file by ID

Parameters

ParameterTypeDescription
fileIdstringThe unique identifier of the file to delete

Returns

Promise<void>

void

Throws

401 - Not authenticated

Throws

403 - Not authorized to delete this file

Throws

404 - File not found

Example

import { deleteFile } from "@cpod/sdk";

await deleteFile("file-123");
console.log("File deleted successfully");