feat(server): add originalFileName to asset table (#2231)

This commit is contained in:
Alex
2023-04-11 05:23:39 -05:00
committed by GitHub
parent db628cec11
commit a1a62b00a0
24 changed files with 143 additions and 60 deletions

View File

@@ -26,7 +26,7 @@ export class StorageTemplateService {
const { asset } = data;
try {
const filename = asset.exifInfo?.imageName || asset.id;
const filename = asset.originalFileName || asset.id;
await this.moveAsset(asset, filename);
// move motion part of live photo
@@ -56,7 +56,7 @@ export class StorageTemplateService {
for (const asset of assets) {
const livePhotoParentAsset = livePhotoMap[asset.id];
// TODO: remove livePhoto specific stuff once upload is fixed
const filename = asset.exifInfo?.imageName || livePhotoParentAsset?.exifInfo?.imageName || asset.id;
const filename = asset.originalFileName || livePhotoParentAsset?.originalFileName || asset.id;
await this.moveAsset(asset, filename);
}