Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func S3Upload ¶ added in v0.9.0
func S3Upload(sFile, dFile, endpoint, accessKeyID, secretAccessKey, bucketName string) (fileSize int64, retErr error)
S3Upload is a function that uploads a file from source to destination to an S3 bucket. It requires the source and destination file path, endpoint, accessKeyID, secretAccessKey, and bucketName as parameters. It determines content type based on source file extension and uses MinIO client for handling S3 operations. In case of a successful upload, it returns the uploaded file size and nil as error. In case of an error, it returns zero as file size and the error that occurred.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.