Versions in this module Expand all Collapse all v1 v1.3.2 May 12, 2023 v1.3.1 Apr 11, 2023 v1.3.0 Jul 27, 2021 v1.2.9 May 18, 2020 v1.2.8 May 16, 2020 v1.2.7 May 14, 2020 v1.2.6 May 14, 2020 Changes in this version type FileInfo + Message string + Success int v1.2.5 May 12, 2020 Changes in this version type Config + SmallMaxWH int v1.2.3 May 10, 2020 v1.2.2 May 10, 2020 v1.2.1 May 9, 2020 v1.2.0 May 9, 2020 v1.1.9 May 9, 2020 v1.1.8 May 8, 2020 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 + StaticDir string + UploadType int + W int + type FileInfo struct + Config *Config + DialogID string + FileType string + Image image.Image + Name string + ScreenShotURL string + Size int64 + 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) + 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