diff options
| author | Jan Wolff <janw@mailbox.org> | 2025-09-12 10:59:19 +0200 |
|---|---|---|
| committer | Jan Wolff <janw@mailbox.org> | 2025-09-12 10:59:19 +0200 |
| commit | 96765ec3b16714f47322814738a217111fdadb4b (patch) | |
| tree | 9d0e1aba05d94e52d9b677f609503dcc64a9f766 | |
| parent | 154abc0c5016635ad3af49a0772a97fbdc34bedb (diff) | |
don't allow upload lifetime configuration for now
| -rw-r--r-- | controller/app.go | 2 | ||||
| -rw-r--r-- | controller/file.go | 2 | ||||
| -rw-r--r-- | controller/template/index.html | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/controller/app.go b/controller/app.go index c22f165..172a2a2 100644 --- a/controller/app.go +++ b/controller/app.go @@ -45,7 +45,7 @@ func (app *App) StartScheduler() { go func() { for true { - time.Sleep(time.Minute * 13) + time.Sleep(time.Minute * 78) log.Println("running scheduled tasks") app.storage.GarbageCollect() diff --git a/controller/file.go b/controller/file.go index 7aed104..275cc15 100644 --- a/controller/file.go +++ b/controller/file.go @@ -41,7 +41,7 @@ func (app App) FilePost(res http.ResponseWriter, req *http.Request) { Protected: protected, Filename: formFileHeader.Filename, Data: fileData, - AvailableUntil: time.Now().Add(time.Hour * 2), + AvailableUntil: time.Now().Add(time.Hour * 24), } key, err := app.storage.Put(file) diff --git a/controller/template/index.html b/controller/template/index.html index f50be97..6f0fc50 100644 --- a/controller/template/index.html +++ b/controller/template/index.html @@ -15,12 +15,12 @@ </label> <input id="protect" type="checkbox" name="protect"> </div> - <div> + <!--div> <label for="until"> Available Until: </label> <input id="until" type="datetime-local" name="until"> - </div> + </div--> <input type="submit" id="upload" value="Upload"> </form> </main> |
