🛠️ Default local storage home directory (#244)

This commit is contained in:
Montassar Ghanmy
2023-11-07 14:33:04 +01:00
committed by GitHub
parent d51c9bdbd2
commit bddd7e3573
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -132,7 +132,7 @@
"secretKey":"x1yz"
},
"local":{
"path":"/storage/"
"path":"/tdrive"
}
},
"email-pusher":{
@@ -23,7 +23,7 @@ export default class StorageService extends TdriveService<StorageAPI> implements
private encryptionOptions: EncryptionConfiguration;
private algorithm = "aes-256-cbc";
private homeDir = "/tdrive";
private homeDir = this.configuration.get<string>("local.path", "/tdrive");
api(): StorageAPI {
return this;
@@ -48,6 +48,9 @@ export default class StorageService extends TdriveService<StorageAPI> implements
accessKey: this.configuration.get<string>("S3.accessKey"),
secretKey: this.configuration.get<string>("S3.secretKey"),
});
} else {
logger.info("Using 'local' connector for storage.");
if (!this.homeDir) this.homeDir = "/tdrive";
}
logger.info(
`Using 'local' connector for storage${