reactor:【INFRA】文件上传 api,增加 directory 参数,去除 path 参数,并支持按照日期分目录、文件名不再使用 sha256 而是时间戳
This commit is contained in:
@ -8,6 +8,8 @@ export interface FilePresignedUrlRespVO {
|
||||
uploadUrl: string
|
||||
// 文件 URL
|
||||
url: string
|
||||
// 文件路径
|
||||
path: string
|
||||
}
|
||||
|
||||
// 查询文件列表
|
||||
@ -21,10 +23,10 @@ export const deleteFile = (id: number) => {
|
||||
}
|
||||
|
||||
// 获取文件预签名地址
|
||||
export const getFilePresignedUrl = (path: string) => {
|
||||
export const getFilePresignedUrl = (name: string, directory?: string) => {
|
||||
return request.get<FilePresignedUrlRespVO>({
|
||||
url: '/infra/file/presigned-url',
|
||||
params: { path }
|
||||
params: { name, directory }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user