Use Content-length to deny files larger than quota

master
Caj Larsson 3 years ago
parent 288f8c4804
commit 8f2febebbf

@ -46,6 +46,8 @@ func (b BogFileService) SaveFile(ref FileReference, src io.Reader, size int64) e
io.Copy(f, src) io.Copy(f, src)
f.Close() f.Close()
user_agent.FileQuota.Add(size)
b.user_agent_repo.Update(user_agent.ID, *user_agent)
return nil return nil
} }

Loading…
Cancel
Save