Skip to content

Commit

Permalink
Update filers saver interface
Browse files Browse the repository at this point in the history
  • Loading branch information
airenas committed Jan 4, 2023
1 parent 9be6f69 commit 2cb3791
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/miniofs/filer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ func validate(opt Options) error {
}

// SaveFile saves file to s3/minio
func (fs *Filer) SaveFile(ctx context.Context, name string, reader io.Reader) error {
func (fs *Filer) SaveFile(ctx context.Context, name string, reader io.Reader, fileSize int64) error {
if strings.Contains(name, "..") {
return fmt.Errorf("wrong path '%s'", name)
}
info, err := fs.minioClient.PutObject(ctx, fs.bucket, name, reader, -1, minio.PutObjectOptions{})
info, err := fs.minioClient.PutObject(ctx, fs.bucket, name, reader, fileSize, minio.PutObjectOptions{})
if err != nil {
return fmt.Errorf("can't save %s: %w", name, err)
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
num=1.2
num=1.3
commit_count=$(shell git rev-list --count HEAD)

version?=v$(num).$(commit_count)

0 comments on commit 2cb3791

Please sign in to comment.