Documentation ¶
Overview ¶
gmfs util
Index ¶
- func ByteMD5(data []byte) string
- func FileHashMD5(path string) (string, error)
- func FileSuffix(fileName string) string
- func GenerateRandomFilename(dot bool, extension string) string
- func IsImage(filetype string) bool
- func Mkdir(filePath string) bool
- func PathExist(filePath string) bool
- func ReaderHashMD5(r io.Reader) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImage ¶
*
- 判断上传文件是否为图片
- buff, why 512 bytes ? see http://golang.org/pkg/net/http/#DetectContentType
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.