mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server): split generated content into a separate folder (#2047)
* feat: organize media folders * fix: tests
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export * from './storage.core';
|
||||
export * from './storage.repository';
|
||||
export * from './storage.service';
|
||||
|
||||
16
server/libs/domain/src/storage/storage.core.ts
Normal file
16
server/libs/domain/src/storage/storage.core.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { join } from 'node:path';
|
||||
import { APP_MEDIA_LOCATION } from '../domain.constant';
|
||||
|
||||
export enum StorageFolder {
|
||||
ENCODED_VIDEO = 'encoded-video',
|
||||
LIBRARY = 'library',
|
||||
UPLOAD = 'upload',
|
||||
PROFILE = 'profile',
|
||||
THUMBNAILS = 'thumbs',
|
||||
}
|
||||
|
||||
export class StorageCore {
|
||||
getFolderLocation(folder: StorageFolder, userId: string) {
|
||||
return join(APP_MEDIA_LOCATION, folder, userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user