summaryrefslogtreecommitdiff
path: root/src/services/drive/internal-storage.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/drive/internal-storage.ts')
-rw-r--r--src/services/drive/internal-storage.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/services/drive/internal-storage.ts b/src/services/drive/internal-storage.ts
index 5ec563584f..e857f942cc 100644
--- a/src/services/drive/internal-storage.ts
+++ b/src/services/drive/internal-storage.ts
@@ -1,9 +1,15 @@
import * as fs from 'fs';
import * as Path from 'path';
-import config from '@/config';
+import { fileURLToPath } from 'url';
+import { dirname } from 'path';
+import config from '@/config/index.js';
+
+//const _filename = fileURLToPath(import.meta.url);
+const _filename = __filename;
+const _dirname = dirname(_filename);
export class InternalStorage {
- private static readonly path = Path.resolve(__dirname, '../../../files');
+ private static readonly path = Path.resolve(_dirname, '../../../files');
public static resolvePath = (key: string) => Path.resolve(InternalStorage.path, key);