return delete token

this somehow didnt end up in the previous commit??
This commit is contained in:
2026-11-10 13:14:44 -05:00
parent 4c25a66f0f
commit 77e28c42d2
+4 -1
View File
@@ -1,7 +1,9 @@
package main
import (
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
@@ -28,7 +30,7 @@ func health(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "OK")
}
type uploadInput struct {
type UploadInput struct {
Reader io.Reader
Filename string
MIMEType string
@@ -191,6 +193,7 @@ func uploadHandler(db *gorm.DB, cfg Config) http.HandlerFunc {
SHA256: hasher.Sum(nil),
CreatedAt: createdAt,
LastAccessedAt: createdAt,
DeleteToken: rand.Text(),
}
err = insertUpload(db, &upload)
if err != nil {