fix: we aren't pinning small files after uploading

This commit is contained in:
Derrick Hammer 2024-03-21 15:50:11 -04:00
parent a8f62fd666
commit a48b10e50c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -497,6 +497,12 @@ func (s *S5API) smallFileUpload(jc jape.Context) {
return
}
err2 = s.accounts.PinByHash(newUpload.Hash, user)
if err2 != nil {
s.sendErrorResponse(jc, NewS5Error(ErrKeyFileUploadFailed, err2))
return
}
cidStr, err2 := cid.ToString()
if err2 != nil {
s.sendErrorResponse(jc, NewS5Error(ErrKeyFileUploadFailed, err2))