mirror of
https://github.com/timvisee/send.git
synced 2026-04-18 21:54:11 -04:00
added gcs
This commit is contained in:
@@ -5,7 +5,14 @@ const createRedisClient = require('./redis');
|
||||
|
||||
class DB {
|
||||
constructor(config) {
|
||||
const Storage = config.s3_bucket ? require('./s3') : require('./fs');
|
||||
let Storage = null;
|
||||
if (config.s3_bucket) {
|
||||
Storage = require('./s3');
|
||||
} else if (config.gcs_bucket) {
|
||||
Storage = require('./gcs');
|
||||
} else {
|
||||
Storage = require('./fs');
|
||||
}
|
||||
this.log = mozlog('send.storage');
|
||||
this.expireSeconds = config.expire_seconds;
|
||||
this.storage = new Storage(config, this.log);
|
||||
|
||||
Reference in New Issue
Block a user