Skip to content

High performance self-hosted photo and video management solution.

Use APP_UPLOAD_LOCATION constant for diskInfo (#271)

bo0tzz2e85e1802026
diff --git a/server/apps/immich/src/api-v1/server-info/server-info.service.ts b/server/apps/immich/src/api-v1/server-info/server-info.service.ts
index 9e3b0fb4df..e196f397df 100644
--- a/server/apps/immich/src/api-v1/server-info/server-info.service.ts
+++ b/server/apps/immich/src/api-v1/server-info/server-info.service.ts
@@ -1,11 +1,12 @@
import { Injectable } from '@nestjs/common';
import { ServerInfoDto } from './dto/server-info.dto';
import diskusage from 'diskusage';
+import { APP_UPLOAD_LOCATION } from '../../constants/upload_location.constant';
@Injectable()
export class ServerInfoService {
async getServerInfo() {
- const diskInfo = await diskusage.check('./upload');
+ const diskInfo = await diskusage.check(APP_UPLOAD_LOCATION);
const usagePercentage = (((diskInfo.total - diskInfo.free) / diskInfo.total) * 100).toFixed(2);