Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

deleteFile.md

49 lines985 Bytes

function deleteFile<TName>(options): Promise<void>;

Defined in: packages/ai/src/activities/files/index.ts:98

Delete a previously uploaded file. Accepts the handle itself (preferred — the provider-literal type rejects a foreign provider's handle at compile time) or its raw lifecycle id.

Type Parameters

TName

TName extends string

Parameters

options

abortSignal?

AbortSignal

Cancels the request. The call rejects when the signal aborts.

adapter

FilesAdapter<TName> & object

id

| string | FileHandle<NoInfer<TName>>

Returns

Promise<void>

Throws

if the provider's files adapter has no delete (e.g. fal storage).