uploader

package
v0.0.0-...-8ec0a96 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Uploader

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

S3Uploader is a struct that wraps around AWS SDK and provides methods for uploading to S3 bucket.

func NewS3Uploader

func NewS3Uploader(bucketName string) (*S3Uploader, error)

NewS3Uploader creates a new S3Uploader with the provided bucket name.

func (*S3Uploader) UploadImage

func (u *S3Uploader) UploadImage(ctx context.Context, fileHeader *multipart.FileHeader) (string, error)

UploadImage uploads a single image file to S3 bucket.

func (*S3Uploader) UploadImages

func (u *S3Uploader) UploadImages(ctx context.Context, files []*multipart.FileHeader) ([]string, error)

UploadImages uploads the provided image files to S3 bucket.

Jump to

Keyboard shortcuts

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