mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 19:33:24 +00:00
Add DEFAULT_DOWNLOADS variable to set default download count
Fixes https://github.com/timvisee/send/issues/39
This commit is contained in:
@@ -14,11 +14,11 @@ function isDupe(newFile, array) {
|
||||
}
|
||||
|
||||
export default class Archive {
|
||||
constructor(files = [], defaultTimeLimit = 86400) {
|
||||
constructor(files = [], defaultTimeLimit = 86400, defaultDownloadLimit = 1) {
|
||||
this.files = Array.from(files);
|
||||
this.defaultTimeLimit = defaultTimeLimit;
|
||||
this.timeLimit = defaultTimeLimit;
|
||||
this.dlimit = 1;
|
||||
this.dlimit = defaultDownloadLimit;
|
||||
this.password = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||
DEFAULTS,
|
||||
WEB_UI,
|
||||
PREFS,
|
||||
archive: new Archive([], DEFAULTS.EXPIRE_SECONDS),
|
||||
archive: new Archive([], DEFAULTS.EXPIRE_SECONDS, DEFAULTS.DOWNLOADS),
|
||||
capabilities,
|
||||
translate,
|
||||
storage,
|
||||
|
||||
Reference in New Issue
Block a user