upload

package
v0.0.0-...-6bf0a34 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContainExt

func CheckContainExt(t FileType, name string) bool

func CheckMaxSize

func CheckMaxSize(t FileType, f multipart.File) bool

func CheckPath

func CheckPath(dst string) bool

func CheckPermission

func CheckPermission(dst string) bool

func CreatePath

func CreatePath(dst string, perm os.FileMode) error

func FileToMultipart

func FileToMultipart(file *os.File) (multipart.File, *multipart.FileHeader, error)

func GetFileExt

func GetFileExt(name string) string

func GetFileName

func GetFileName(name string) string

func GetSavePath

func GetSavePath() string

func GetSavePreDirPath

func GetSavePreDirPath() string

func GetServerUrl

func GetServerUrl() string

func GetTempPath

func GetTempPath() string

func SaveFile

func SaveFile(file multipart.File, dst string) error

Types

type FileType

type FileType int
const TypeImage FileType = iota + 1

Jump to

Keyboard shortcuts

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