file

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndConvertFile added in v1.0.5

func CheckAndConvertFile(file io.Reader, fileName string) (io.Reader, error)

CheckAndConvertFile checks if a file is an image and converts it to WebP

func DeleteFile

func DeleteFile(filename, uploadDirectory string) error

DeleteFile removes a single file from the specified directory

func DeleteMultipleFiles added in v1.0.3

func DeleteMultipleFiles(filenames []string, uploadDirectory string) error

DeleteMultipleFiles deletes multiple files and returns error if any deletions fail

func UploadFile

func UploadFile(file io.Reader, fileName, uploadDirectory string, convertToWebP bool) (string, error)

UploadFile uploads a single file to the specified directory

func UploadMultipleFiles added in v1.0.3

func UploadMultipleFiles(files []io.Reader, fileNames []string, uploadDirectory string, convertToWebP bool) ([]string, error)

UploadMultipleFiles uploads multiple files and rolls back if any fail

Types

This section is empty.

Jump to

Keyboard shortcuts

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