mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 18:19:10 +03:00
feat: change default media location to /data (#20367)
* feat!: change default media location to /data * feat: dynamically detect media location
This commit is contained in:
@@ -97,6 +97,7 @@ export interface EnvData {
|
||||
|
||||
storage: {
|
||||
ignoreMountCheckErrors: boolean;
|
||||
mediaLocation?: string;
|
||||
};
|
||||
|
||||
workers: ImmichWorker[];
|
||||
@@ -307,6 +308,7 @@ const getEnv = (): EnvData => {
|
||||
|
||||
storage: {
|
||||
ignoreMountCheckErrors: !!dto.IMMICH_IGNORE_MOUNT_CHECK_ERRORS,
|
||||
mediaLocation: dto.IMMICH_MEDIA_LOCATION,
|
||||
},
|
||||
|
||||
telemetry: {
|
||||
|
||||
@@ -162,6 +162,10 @@ export class StorageRepository {
|
||||
}
|
||||
}
|
||||
|
||||
existsSync(filepath: string) {
|
||||
return existsSync(filepath);
|
||||
}
|
||||
|
||||
async checkDiskUsage(folder: string): Promise<DiskUsage> {
|
||||
const stats = await fs.statfs(folder);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user