Versions in this module Expand all Collapse all v0 v0.1.1 Jan 27, 2022 Changes in this version + var ErrorBigSize = errors.New("File is too big") + var ErrorFileType = errors.New("Type of file not allowed") + var ErrorSmallSize = errors.New("File is too small") + var ErrorUploadType = errors.New("Type of Upload not allowed") + type Config struct + AlbumID int64 + H int + LastSource string + MaxSize int64 + MaxWidthHeight int + MinSize int64 + SmallMaxWH int + StaticDir string + UploadType int + W int + type FileInfo struct + Config *Config + DialogID string + FileType string + Image image.Image + Message string + Name string + ScreenShotURL string + Size int64 + Success int + URL string + func NewFileInfo(file io.Reader, fileName string, opt ...*Config) (*FileInfo, error) + func (f *FileInfo) ChangeToSmall(path string) string + func (f *FileInfo) CheckSource() bool + func (f *FileInfo) CreatePicClip(path string, w, h, q int) error + func (f *FileInfo) CreatePicScale(path string, w, h, q int) error + func (f *FileInfo) GetFrame(mediaPath string) (string, error) + func (f *FileInfo) JoinInfo() (path string) + func (f *FileInfo) ParseMediaExt(fileName string) + func (f *FileInfo) RemoveLastSource(lastSrc string, small ...bool) + func (f *FileInfo) RetMaxWH(max int) (int, int) + func (f *FileInfo) RetRealWHEXT() (int, int) + func (f *FileInfo) SaveImage(path string) (err error) + func (f *FileInfo) ValidateSize() (err error) + func (f *FileInfo) ValidateType() (err error) + type Sizer interface + Size func() int64