avatar

package
v0.0.0-...-1ad4281 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func CleanupOld(userId int64) error

CleanupOld removes deactivated avatars from file store by userId

func GetUrl

func GetUrl(userID int64) (url string, err error)

func HasAvatar

func HasAvatar(userID int64) (hasAvatar bool, err error)

func InsertAvatar

func InsertAvatar(userID int64, fileType fileutil.Format, b58hash string) error

func Remove

func Remove(userID int64) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL