Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFolderAndFile ¶
remove dir or file and check if doesn't exists
func RenameFolderAndFile ¶
rename dir or file and check if doesn't exists
Types ¶
type MagicImage ¶
type MagicImage struct { MultipartForm *multipart.Form AllowExt []string MaxFileSize int Required bool DuplicateImage []uint64 MinFileInSlice int MaxFileInSlice int Files []*multipart.FileHeader FileNames []string }
func New ¶
func New(MultipartForm *multipart.Form) *MagicImage
New returns a new blank MagicImage instance. By default the configuration is: - AllowExt: jpeg, png - MaxFileSize: 4 MB - Required: true
func (*MagicImage) SaveImages ¶
func (magic *MagicImage) SaveImages(width, height int, path_upload string, square bool) error
save image for single image & multiple image with feature fix orientation iphone & create dir when doesn't exists.
func (*MagicImage) ValidateMultipleImage ¶
func (magic *MagicImage) ValidateMultipleImage(key string) error
validator for multiple image with addon feature all image must be unique.
func (*MagicImage) ValidateSingleImage ¶
func (magic *MagicImage) ValidateSingleImage(key string) error
validator for single image.
Click to show internal directories.
Click to hide internal directories.