From 97e7a53a2b1f7c324f81e2884c76b8a3048d2d66 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Fri, 30 Jan 2026 14:27:42 +0800 Subject: [PATCH] add delete --- package.json | 2 +- query/query-resources/index.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 03d0f8f..dbf6446 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/api", - "version": "0.0.29", + "version": "0.0.30", "description": "", "main": "mod.ts", "scripts": { diff --git a/query/query-resources/index.ts b/query/query-resources/index.ts index 76307f0..da1ed0a 100644 --- a/query/query-resources/index.ts +++ b/query/query-resources/index.ts @@ -79,6 +79,14 @@ export class QueryResources { body: formData, }); } + async deleteFile(filepath: string, opts?: DataOpts): Promise> { + const url = `${this.prefix}${filepath}`; + return adapter({ + url, + method: 'DELETE' as any, + headers: this.header(opts?.headers), + }); + } } export const getContentType = (filename: string): string => {