Documentation ¶
Index ¶
- Constants
- func CopyFile(src, dst string) error
- func CreateSavePath(dst string, perm os.FileMode) error
- func DIR() string
- func Exist(path string) (bool, error)
- func FILE() string
- func GetFileHeaderMd5Name(fileHeader *multipart.FileHeader) (string, error)
- func GetFileList(path string) []string
- func LINE() int
- func RemoveFile(file string) error
- func SaveFile(file *multipart.FileHeader, dst string) error
- func Trace(skip int) (arr []string)
- func WriteToFile(filename string, b []byte) error
- type FileUploadResult
Constants ¶
View Source
const (
EL = "\n"
)
Variables ¶
This section is empty.
Functions ¶
func GetFileHeaderMd5Name ¶
func GetFileHeaderMd5Name(fileHeader *multipart.FileHeader) (string, error)
func RemoveFile ¶
Types ¶
type FileUploadResult ¶
func UploadFile ¶
func UploadFile(assetsDir string, file *multipart.FileHeader) (*FileUploadResult, error)
上传file文件到assetsDir目录下,assetsDir 目录不存在则自动创建,返回存储位置
Click to show internal directories.
Click to hide internal directories.