summaryrefslogtreecommitdiffstats
path: root/modules/storage/minio.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/storage/minio.go')
-rw-r--r--modules/storage/minio.go4
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 {