feat(web,server): user storage label (#2418)
* feat: user storage label * chore: open api * fix: checks * fix: api update validation and tests * feat: default admin storage label * fix: linting * fix: user create/update dto * fix: delete library with custom label
This commit is contained in:
@@ -10,7 +10,14 @@ export enum StorageFolder {
|
||||
}
|
||||
|
||||
export class StorageCore {
|
||||
getFolderLocation(folder: StorageFolder, userId: string) {
|
||||
getFolderLocation(
|
||||
folder: StorageFolder.ENCODED_VIDEO | StorageFolder.UPLOAD | StorageFolder.PROFILE | StorageFolder.THUMBNAILS,
|
||||
userId: string,
|
||||
) {
|
||||
return join(APP_MEDIA_LOCATION, folder, userId);
|
||||
}
|
||||
|
||||
getLibraryFolder(user: { storageLabel: string | null; id: string }) {
|
||||
return join(APP_MEDIA_LOCATION, StorageFolder.LIBRARY, user.storageLabel || user.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user