1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

fix(server): full-size images not migrated or deleted correctly (#17308)

* fix file path logic

* update tests

* add empty array fallback just in case for now
This commit is contained in:
Mert
2025-04-01 18:11:46 -04:00
committed by GitHub
parent e4b0c00885
commit 59e5c82569
13 changed files with 84 additions and 31 deletions

View File

@@ -26,7 +26,16 @@ const thumbnailFile: AssetFileEntity = {
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
};
const files: AssetFileEntity[] = [previewFile, thumbnailFile];
const fullsizeFile: AssetFileEntity = {
id: 'file-3',
assetId: 'asset-id',
type: AssetFileType.FULLSIZE,
path: '/uploads/user-id/fullsize/path.webp',
createdAt: new Date('2023-02-23T05:06:29.716Z'),
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
};
const files: AssetFileEntity[] = [fullsizeFile, previewFile, thumbnailFile];
export const stackStub = (stackId: string, assets: AssetEntity[]): StackEntity => {
return {
@@ -553,6 +562,7 @@ export const assetStub = {
fileSizeInByte: 25_000,
timeZone: `America/New_York`,
},
files,
} as AssetEntity),
livePhotoWithOriginalFileName: Object.freeze({