Documentation ¶
Index ¶
- Constants
- func CleanupOld(userId int64) error
- func GetUrl(userID int64) (url string, err error)
- func HasAvatar(userID int64) (hasAvatar bool, err error)
- func InsertAvatar(userID int64, fileType fileutil.Format, b58hash string) error
- func Remove(userID int64) error
- func TransformAndSave(userId int64, imageMPH *multipart.FileHeader) (newUrl string, err error)
- func ValidateMpFileHeader(fileHead *multipart.FileHeader) error
Constants ¶
View Source
const ( MaxHightWidth int = 500 SubPath = "users/avatars" )
View Source
const (
MaxAvatarSize int64 = 1024 * 1024 * 5 // 5Mb
)
Variables ¶
This section is empty.
Functions ¶
func CleanupOld ¶
CleanupOld removes deactivated avatars from file store by userId
func TransformAndSave ¶
func TransformAndSave(userId int64, imageMPH *multipart.FileHeader) (newUrl string, err error)
func ValidateMpFileHeader ¶
func ValidateMpFileHeader(fileHead *multipart.FileHeader) error
ValidateMpFileHeader multipart.FileHeader
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.