Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Upload = TConfig{ Path: dotenv.GetByDefault("UPLOAD_DIR", "upload"), File: FileConfig{ Path: "file", MaxSize: dotenv.GetInt64ByDefault("UPLOAD_FILE_MAX_SIZE", 1024*1024*10), AllowType: dotenv.GetStrArrayByDefault("UPLOAD_FILE_EXTENSION", []string{".txt", ".md"}), }, Image: ImageConfig{ Path: "image", MaxSize: dotenv.GetInt64ByDefault("UPLOAD_IMAGE_MAX_SIZE", 1024*1024*10), }, }
Functions ¶
Types ¶
type FileConfig ¶
type ImageConfig ¶
type TConfig ¶
type TConfig struct { Path string `json:"path"` //文件上传的根目录 File FileConfig `json:"file"` // 普通文件上传的配置 Image ImageConfig `json:"image"` // 普通图片上传的配置 }
Click to show internal directories.
Click to hide internal directories.