Backport #15264 This PR proposes an alternative solution to #15255 - just add the size to the save function. Yes it is less apparently clean but it may be more correct. Close #15255 Fix #15253 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
558b0005ff
commit
013639b13f
7 changed files with 18 additions and 10 deletions
|
@ -295,7 +295,8 @@ func (g *GiteaLocalUploader) CreateReleases(downloader base.Downloader, releases
|
|||
}
|
||||
rc = resp.Body
|
||||
}
|
||||
_, err = storage.Attachments.Save(attach.RelativePath(), rc)
|
||||
defer rc.Close()
|
||||
_, err = storage.Attachments.Save(attach.RelativePath(), rc, int64(*asset.Size))
|
||||
return err
|
||||
}()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue