@wzyjs/utils 0.3.18 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/oss/cloudflare.d.ts +7 -2
- package/dist/node.cjs.js +72 -31864
- package/dist/node.esm.js +6622 -38404
- package/dist/web.cjs.js +17731 -20318
- package/dist/web.esm.js +17725 -20330
- package/package.json +2 -2
|
@@ -6,12 +6,17 @@ interface UploadFile {
|
|
|
6
6
|
/**
|
|
7
7
|
* 上传文件到 Cloudflare R2
|
|
8
8
|
* @param params - 上传参数
|
|
9
|
-
* @returns 上传后的文件信息 {
|
|
9
|
+
* @returns 上传后的文件信息 { objectKey }
|
|
10
10
|
*/
|
|
11
11
|
export declare function uploadFile(params: UploadFile): Promise<{
|
|
12
|
-
url: string;
|
|
13
12
|
objectKey: string;
|
|
14
13
|
}>;
|
|
14
|
+
/**
|
|
15
|
+
* 拼接 Cloudflare R2 文件的公开访问 URL
|
|
16
|
+
* @param objectKey - 文件在 R2 中的 Key
|
|
17
|
+
* @returns 文件的完整访问 URL
|
|
18
|
+
*/
|
|
19
|
+
export declare function getPublicUrl(objectKey: string): string;
|
|
15
20
|
/**
|
|
16
21
|
* 从 Cloudflare R2 删除文件
|
|
17
22
|
* @param objectKey - 文件在 S3 中的 Key
|