Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsTransparent ¶ added in v1.20.1
judge png contains transparent
func GetFileContentType ¶ added in v1.20.1
file byte data[:512] image type: "image/jpeg","image/png"
Types ¶
type File ¶
type File struct { // file name Name string // path Path string NewPath string // img attributes Width int Height int // format 2006-01-02 15:04:05 Format string IsComp int8 // is img compress Quality int // default 80, 1-100 }
file
func (*File) GetUploadFile ¶
func (f *File) GetUploadFile(file *multipart.FileHeader) (filename string, err error)
获得文件上传路径
func (*File) SaveUploadedFile ¶
func (f *File) SaveUploadedFile(file *multipart.FileHeader, filename string) (path string, err error)
save file
Click to show internal directories.
Click to hide internal directories.