🛠️ Default local storage home directory (#244)
This commit is contained in:
@@ -132,7 +132,7 @@
|
|||||||
"secretKey":"x1yz"
|
"secretKey":"x1yz"
|
||||||
},
|
},
|
||||||
"local":{
|
"local":{
|
||||||
"path":"/storage/"
|
"path":"/tdrive"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"email-pusher":{
|
"email-pusher":{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default class StorageService extends TdriveService<StorageAPI> implements
|
|||||||
|
|
||||||
private encryptionOptions: EncryptionConfiguration;
|
private encryptionOptions: EncryptionConfiguration;
|
||||||
private algorithm = "aes-256-cbc";
|
private algorithm = "aes-256-cbc";
|
||||||
private homeDir = "/tdrive";
|
private homeDir = this.configuration.get<string>("local.path", "/tdrive");
|
||||||
|
|
||||||
api(): StorageAPI {
|
api(): StorageAPI {
|
||||||
return this;
|
return this;
|
||||||
@@ -48,6 +48,9 @@ export default class StorageService extends TdriveService<StorageAPI> implements
|
|||||||
accessKey: this.configuration.get<string>("S3.accessKey"),
|
accessKey: this.configuration.get<string>("S3.accessKey"),
|
||||||
secretKey: this.configuration.get<string>("S3.secretKey"),
|
secretKey: this.configuration.get<string>("S3.secretKey"),
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
logger.info("Using 'local' connector for storage.");
|
||||||
|
if (!this.homeDir) this.homeDir = "/tdrive";
|
||||||
}
|
}
|
||||||
logger.info(
|
logger.info(
|
||||||
`Using 'local' connector for storage${
|
`Using 'local' connector for storage${
|
||||||
|
|||||||
Reference in New Issue
Block a user