feat(server): normalize extensions in storage template (#16667)

* normalize and lowercase extensions

* un const

* do not change ext before stripping off old one

* braces
This commit is contained in:
Matthew Momjian
2025-03-06 18:02:28 -05:00
committed by GitHub
parent feb65bf5a7
commit 5c82c485d7
3 changed files with 30 additions and 3 deletions
@@ -105,7 +105,7 @@ describe(StorageTemplateService.name, () => {
it('should migrate single moving picture', async () => {
mocks.user.get.mockResolvedValue(userStub.user1);
const newMotionPicturePath = `upload/library/${userStub.user1.id}/2022/2022-06-19/${assetStub.livePhotoStillAsset.id}.mp4`;
const newStillPicturePath = `upload/library/${userStub.user1.id}/2022/2022-06-19/${assetStub.livePhotoStillAsset.id}.jpeg`;
const newStillPicturePath = `upload/library/${userStub.user1.id}/2022/2022-06-19/${assetStub.livePhotoStillAsset.id}.jpg`;
mocks.asset.getByIds.mockImplementation((ids) => {
const assets = [assetStub.livePhotoStillAsset, assetStub.livePhotoMotionAsset];