add delete

This commit is contained in:
2026-01-30 14:27:42 +08:00
parent ef5d3c3805
commit 97e7a53a2b
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@kevisual/api", "name": "@kevisual/api",
"version": "0.0.29", "version": "0.0.30",
"description": "", "description": "",
"main": "mod.ts", "main": "mod.ts",
"scripts": { "scripts": {

View File

@@ -79,6 +79,14 @@ export class QueryResources {
body: formData, body: formData,
}); });
} }
async deleteFile(filepath: string, opts?: DataOpts): Promise<Result<any>> {
const url = `${this.prefix}${filepath}`;
return adapter({
url,
method: 'DELETE' as any,
headers: this.header(opts?.headers),
});
}
} }
export const getContentType = (filename: string): string => { export const getContentType = (filename: string): string => {