upload

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUploadProgress

type FileUploadProgress struct {
	Name      string
	Uploaded  int64
	TotalSize int64
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is a manager for uploading files through minio client. Note that it's user's responsibility to check the Errs field after Wait() to see if there's any error.

func NewUploadManager

func NewUploadManager(client *minio.Client, storage *storage.Storage, cacheBucket string, networkChan chan *model.NetworkUsage) (*Manager, error)

func (*Manager) FMultipartPutObject

func (u *Manager) FMultipartPutObject(ctx context.Context, bucket string, key string, filePath string, fileSize int64, opts minio.PutObjectOptions) (err error)

FMultipartPutObject uploads a file to a bucket with a key and sha256..

func (*Manager) FPutObject

func (u *Manager) FPutObject(absPath string, bucket string, key string, filesize int64, userTags map[string]string) error

FPutObject uploads a file to a bucket with a key and sha256. If the file size is larger than minPartSize, it will use multipart upload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL