Update upload.go

This commit is contained in:
ZizzyDizzyMC 2021-02-22 00:27:21 -05:00
parent c49e1e62d5
commit 797a61cf5c
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ func processUpload(upReq UploadRequest) (upload Upload, err error) {
// Get the rest of the metadata needed for storage // Get the rest of the metadata needed for storage
var fileExpiry time.Time var fileExpiry time.Time
maxDurationTime := time.Duration(Config.maxDurationTime) maxDurationTime := time.Duration(Config.maxDurationTime) * time.Second
if upReq.expiry == 0 { if upReq.expiry == 0 {
if upReq.size > Config.maxDurationSize && maxDurationTime > 0 { if upReq.size > Config.maxDurationSize && maxDurationTime > 0 {
fileExpiry = time.Now().Add(maxDurationTime) fileExpiry = time.Now().Add(maxDurationTime)