MCPcopy Create free account
hub / github.com/instantdb/instant / deleteFile

Function deleteFile

client/packages/core/src/StorageAPI.ts:51–74  ·  view source on GitHub ↗
({
  apiURI,
  appId,
  path,
  refreshToken,
}: {
  apiURI: string;
  appId: string;
  path: string;
  refreshToken?: string;
})

Source from the content-addressed store, hash-verified

49}
50
51export async function deleteFile({
52 apiURI,
53 appId,
54 path,
55 refreshToken,
56}: {
57 apiURI: string;
58 appId: string;
59 path: string;
60 refreshToken?: string;
61}): Promise<DeleteFileResponse> {
62 const { data } = await jsonFetch(
63 `${apiURI}/storage/files?app_id=${appId}&filename=${encodeURIComponent(path)}`,
64 {
65 method: 'DELETE',
66 headers: {
67 'content-type': 'application/json',
68 authorization: `Bearer ${refreshToken}`,
69 },
70 },
71 );
72
73 return data;
74}
75
76// Deprecated Storage API (Jan 2025)
77// ---------------------------------

Callers

nothing calls this directly

Calls 1

jsonFetchFunction · 0.50

Tested by

no test coverage detected