diff --git a/tdrive/backend/node/config/default.json b/tdrive/backend/node/config/default.json index 71adef60b..ffa4dd334 100644 --- a/tdrive/backend/node/config/default.json +++ b/tdrive/backend/node/config/default.json @@ -132,7 +132,7 @@ "secretKey":"x1yz" }, "local":{ - "path":"/storage/" + "path":"/tdrive" } }, "email-pusher":{ diff --git a/tdrive/backend/node/src/core/platform/services/storage/index.ts b/tdrive/backend/node/src/core/platform/services/storage/index.ts index 0dc5466aa..e4d3049b5 100644 --- a/tdrive/backend/node/src/core/platform/services/storage/index.ts +++ b/tdrive/backend/node/src/core/platform/services/storage/index.ts @@ -23,7 +23,7 @@ export default class StorageService extends TdriveService implements private encryptionOptions: EncryptionConfiguration; private algorithm = "aes-256-cbc"; - private homeDir = "/tdrive"; + private homeDir = this.configuration.get("local.path", "/tdrive"); api(): StorageAPI { return this; @@ -48,6 +48,9 @@ export default class StorageService extends TdriveService implements accessKey: this.configuration.get("S3.accessKey"), secretKey: this.configuration.get("S3.secretKey"), }); + } else { + logger.info("Using 'local' connector for storage."); + if (!this.homeDir) this.homeDir = "/tdrive"; } logger.info( `Using 'local' connector for storage${