Skip to content
Permalink
Browse files

Add UnixDeleteAt for unencrypted uploads

This fixes a bug introduced in a3fbf07 where UnixDeleteAt was
introduced from encrypted, but not for unencrypted files.
  • Loading branch information...
tribut committed Feb 21, 2018
1 parent 0b032c2 commit ea90b8d0c0680f4f749deb57b7b57cda1a23b91d
Showing with 3 additions and 1 deletion.
  1. +3 −1 server/views/unencrypted.go
@@ -74,11 +74,13 @@ func Create(c *gin.Context) {
return
}
}
del := time.Now().Add(duration)
newres := &models.Resource{
Key: u,
Name: h.Filename,
Once: once,
DeleteAt: time.Now().Add(duration),
DeleteAt: del,
UnixDeleteAt: del.Unix(),
Size: wr,
}
if err = newres.Save(); err != nil {

0 comments on commit ea90b8d

Please sign in to comment.
You can’t perform that action at this time.