fix(file-browser): reuse download-link API url for copy name and path

This commit is contained in:
yiling
2026-07-27 10:26:42 +08:00
parent f429873362
commit d364e13eb7
3 changed files with 1 additions and 11 deletions
-9
View File
@@ -55,7 +55,6 @@ export interface S3Service {
uploadFile(filePath: string, contentType: string): Promise<string>
uploadFileToKey(filePath: string, key: string, contentType: string): Promise<void>
presign(bucket: string, key: string, method: string, download?: boolean): Promise<string>
getAbsolutePathOrUrl(bucket: string, key: string): Promise<string>
}
export class S3StorageService implements S3Service {
@@ -231,10 +230,6 @@ export class S3StorageService implements S3Service {
return url
}
async getAbsolutePathOrUrl(bucket: string, key: string): Promise<string> {
return this.presign(bucket, key, 'GET', true)
}
}
export class LocalStorageService implements S3Service {
@@ -446,10 +441,6 @@ export class LocalStorageService implements S3Service {
}
return url
}
async getAbsolutePathOrUrl(bucket: string, key: string): Promise<string> {
return this.getFilePath(bucket, key)
}
}
const storageBackend = process.env.STORAGE_BACKEND || 'local'