Documentation ¶
Index ¶
- Constants
- func DownloadFile(context *gin.Context)
- func GetFileRaw(context *gin.Context)
- func GetOriginImage(context *gin.Context)
- func GetThumbnailImage(context *gin.Context)
- func InitUploader(c *TConfig) (err error)
- func UploadFile(context *gin.Context)
- func UploaderImage(context *gin.Context)
- func UploaderTemplate(template string) func(context *gin.Context)
- type FileConfig
- type ImageConfig
- type TConfig
- type ThumbnailConfig
- type Uploader
Constants ¶
View Source
const FIELD = "file"
Variables ¶
This section is empty.
Functions ¶
func InitUploader ¶
func UploaderTemplate ¶
* Generate Upload example Template
Types ¶
type FileConfig ¶
type ImageConfig ¶
type ImageConfig struct { Path string `valid:"required,length(1|20)"` // 图片存储路径 MaxSize int `valid:"required"` // 最大图片上传限制,单位byte Thumbnail ThumbnailConfig }
type TConfig ¶
type TConfig struct { Path string `valid:"required,length(1|20)"` //文件上传的根目录 UrlPrefix string `valid:"required,length(0|20)"` // api的url前缀 File FileConfig Image ImageConfig }
var Config TConfig
type ThumbnailConfig ¶
Click to show internal directories.
Click to hide internal directories.