- 修改随机字符串长度,从substr(2,9)调整为substring(2,11)以增加uid唯一性 - 移除minio工具中未使用的InferRequestType导入,精简依赖
@@ -169,7 +169,7 @@ const MinioUploader: React.FC<MinioUploaderProps> = ({
// 自定义上传逻辑
const handleUpload = async (file: File) => {
- const uid = Date.now().toString() + Math.random().toString(36).substr(2, 9);
+ const uid = Date.now().toString() + Math.random().toString(36).substring(2, 11);
// 添加到文件列表
setFileList(prev => [
@@ -1,4 +1,4 @@
-import type { InferResponseType, InferRequestType } from 'hono/client';
+import type { InferResponseType } from 'hono/client';
import { fileClient } from "../api";
export interface MinioProgressEvent {