files

package
v1.5.48 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToMultipartFileHeader added in v1.5.43

func BytesToMultipartFileHeader(imageBytes []byte, filename string) (*multipart.FileHeader, error)

Types

type KarmaFiles

type KarmaFiles struct {
	PathPrefix     string
	UploadMode     UploadModes
	LocalUploadDir string
}

func NewKarmaFile

func NewKarmaFile(pathPrefix string, uploadMode UploadModes) *KarmaFiles

func (*KarmaFiles) HandleMultipleFileUpload

func (kf *KarmaFiles) HandleMultipleFileUpload(files []*multipart.FileHeader) ([]string, error)

func (*KarmaFiles) HandleSingleFileUpload

func (kf *KarmaFiles) HandleSingleFileUpload(file *multipart.FileHeader) (string, error)

type UploadModes added in v1.3.28

type UploadModes string
const (
	S3            UploadModes = "S3"
	LOCAL         UploadModes = "LOCAL"
	DIGITAL_OCEAN UploadModes = "DIGITAL_OCEAN"
)

Jump to

Keyboard shortcuts

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