feat: add oss service factory implements, add support for setting custom upload handler, localstorage and minio oss

This commit is contained in:
RockYang
2023-08-20 22:29:08 +08:00
parent 5a0f272fa8
commit 3dbeb1ccb6
12 changed files with 227 additions and 100 deletions

View File

@@ -23,7 +23,7 @@ func GenUploadPath(basePath, filename string) (string, error) {
}
}
fileExt := filepath.Ext(filename)
return fmt.Sprintf("%s/%d%s", dir, now.UnixMilli(), fileExt), nil
return fmt.Sprintf("%s/%d%s", dir, now.UnixNano(), fileExt), nil
}
// GenUploadUrl 生成上传文件 URL