Documentation ¶
Index ¶
Constants ¶
View Source
const ( //MinFile minimum File Size MinFile = 1 // bytes // MaxFileSize file size is memcache limit (1MB) minus key size minus overhead: MaxFileSize = 244999000 // bytes //ImageType regxp accepted type ImageType = "((gif|p?jpeg|(x-)?png))" //AcceptFileTypes accepted files AcceptFileTypes = ImageType //ThumbMaxWidth max size ThumbMaxWidth = 200 //ThumbMaxHeight max height ThumbMaxHeight = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Media ¶
type Media struct { Name string `bson:"name" json:"name"` Path string `bson:"path" json:"-"` ThumbnailPath string `bson:"thumbnailPath" json:"-"` MimeType string `bson:"mimetype" json:"mimetype"` URL string `bson:"url" json:"url,omitempty"` ThumbnailURL string `bson:"thumbnailUrl" json:"thumbnailUrl,omitempty"` Size int64 `bson:"size" json:"size"` // contains filtered or unexported fields }
Media Represent a media file
func (*Media) ValidateSize ¶
ValidateSize check the size
func (*Media) ValidateType ¶
ValidateType check type of media
Click to show internal directories.
Click to hide internal directories.