Documentation ¶
Index ¶
- func CheckContainExt(t FileType, name string) bool
- func CheckMaxSize(t FileType, f multipart.File) bool
- func CheckPermission(dst string) bool
- func CheckSavePath(dst string) bool
- func CreateSavePath(dst string, perm os.FileMode) error
- func GetFileExt(name string) string
- func GetFileName(name string) string
- func GetSavePath() string
- func SaveFile(file *multipart.FileHeader, dst string) error
- type FileType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContainExt ¶
CheckContainExt 检查上传的文件后缀是否包含在约定的后缀配置项中
func CheckMaxSize ¶
CheckMaxSize 检查文件大小是否超出最大大小限制
func CreateSavePath ¶
CreateSavePath 创建文件保存目录
func GetFileName ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.