🐛 Fix open files with storage id

This commit is contained in:
LittleSheep 2025-05-22 02:29:58 +08:00
parent 8e8a120a90
commit c3390d7248

View File

@ -31,7 +31,7 @@ public class FileController(
}
var dest = fs.GetRemoteStorageConfig(file.UploadedTo);
var fileName = file.StorageId;
var fileName = string.IsNullOrWhiteSpace(file.StorageId) ? file.Id : file.StorageId;
if (!original && file.HasCompression)
{
@ -65,7 +65,7 @@ public class FileController(
var openUrl = await client.PresignedGetObjectAsync(
new PresignedGetObjectArgs()
.WithBucket(bucket)
.WithObject(file.Id)
.WithObject(fileName)
.WithExpiry(3600)
);