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 /modules/storage/minio.go | |
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 'modules/storage/minio.go')
-rw-r--r-- | modules/storage/minio.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/storage/minio.go b/modules/storage/minio.go index 0e0cb3690d..724445c0ab 100644 --- a/modules/storage/minio.go +++ b/modules/storage/minio.go @@ -131,13 +131,13 @@ func (m *MinioStorage) Open(path string) (Object, error) { } // Save save a file to minio -func (m *MinioStorage) Save(path string, r io.Reader) (int64, error) { +func (m *MinioStorage) Save(path string, r io.Reader, size int64) (int64, error) { uploadInfo, err := m.client.PutObject( m.ctx, m.bucket, m.buildMinioPath(path), r, - -1, + size, minio.PutObjectOptions{ContentType: "application/octet-stream"}, ) if err != nil { |