Add "Hold Uploads" option to configuration

This commit is contained in:
2021-11-07 13:43:25 +10:30
parent 1228920004
commit ced209a7db
4 changed files with 17 additions and 3 deletions

View File

@@ -83,7 +83,12 @@ func (u *Uploader) AddFile(file string, conf config.Watcher) {
watermark: !conf.NoWatermark,
webhookURL: conf.WebHookURL,
usernameOverride: conf.Username,
State: StatePending,
State: StateQueued,
}
// if the user wants uploads to be held for editing etc,
// set it to Pending instead
if conf.HoldUploads {
thisUpload.State = StatePending
}
u.Uploads = append(u.Uploads, &thisUpload)
}