diff options
author | zeripath <art27@cantab.net> | 2021-04-03 17:19:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 18:19:59 +0200 |
commit | 0bb8bd8190a7c3ec84b934642607e24058145b9e (patch) | |
tree | a26069b2548e053ef91f384697f8ff9cfb11a1c2 /models | |
parent | 3cc7d27b6f23628e1ecc9ac1e5f61728be73da76 (diff) | |
download | gitea-0bb8bd8190a7c3ec84b934642607e24058145b9e.tar.gz gitea-0bb8bd8190a7c3ec84b934642607e24058145b9e.zip |
Add size to Save function (#15264)
Fix #15253
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models')
-rw-r--r-- | models/attachment.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/attachment.go b/models/attachment.go index 2126e6d773..e12609f810 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -85,7 +85,7 @@ func (a *Attachment) LinkedRepository() (*Repository, UnitType, error) { func NewAttachment(attach *Attachment, buf []byte, file io.Reader) (_ *Attachment, err error) { attach.UUID = gouuid.New().String() - size, err := storage.Attachments.Save(attach.RelativePath(), io.MultiReader(bytes.NewReader(buf), file)) + size, err := storage.Attachments.Save(attach.RelativePath(), io.MultiReader(bytes.NewReader(buf), file), -1) if err != nil { return nil, fmt.Errorf("Create: %v", err) } |