修复数据类型错误

This commit is contained in:
2025-07-09 01:00:17 +08:00
parent fe15c444f7
commit 28c8fccc40
6 changed files with 40 additions and 143 deletions
+28 -6
View File
@@ -1,5 +1,27 @@
package models
//mime信息转换位拓展名
var Mime_to_extname = map[string]string{
"image/jpeg": ".jpeg",
"image/png": ".png",
"image/gif": ".gif",
"image/bmp": ".bmp",
"video/mp4": ".mp4",
"video/x-msvideo": ".",
"video/quicktime": ".",
"video/x-flv": ".flv",
"video/mpeg": ".mpeg",
"audio/mpeg": ".mp3",
"audio/aac": ".acc",
"audio/wav": ".wav",
"audio/flac": ".flac",
"application/pdf": ".pdf",
}
type Configs_web_t struct {
Host string `mapstructure:"host"`
Port string `mapstructure:"port"`
@@ -17,10 +39,10 @@ type Configs_user_t struct {
}
type Configs_file_t struct {
Max_size uint64 `mapstructure:"max_size"`
Pahts []string `mapstructure:"pahts"`
Allow_image_mime map[string]bool `mapstructure:"allow_image_mime"`
Allow_video_mime map[string]bool `mapstructure:"allow_video_mime"`
Allow_music_mime map[string]bool `mapstructure:"allow_music_mime"`
Allow_pdf_mime map[string]bool `mapstructure:"allow_pdf_mime"`
Max_size uint64 `mapstructure:"max_size"`
Pahts map[string]string `mapstructure:"pahts"`
Allow_image_mime map[string]bool `mapstructure:"allow_image_mime"`
Allow_video_mime map[string]bool `mapstructure:"allow_video_mime"`
Allow_music_mime map[string]bool `mapstructure:"allow_music_mime"`
Allow_pdf_mime map[string]bool `mapstructure:"allow_pdf_mime"`
}