up
This commit is contained in:
@@ -52,6 +52,10 @@ func All_config_init() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//fmt.Println(Configs_file)
|
||||
//fmt.Println(Allowed_avatar_mime)
|
||||
|
||||
//创建file的关键文件夹
|
||||
for _, value := range Configs_file.Pahts {
|
||||
err := os.MkdirAll(value, 0755)
|
||||
|
||||
@@ -17,10 +17,10 @@ type Configs_user_t struct {
|
||||
}
|
||||
|
||||
type Configs_file_t struct {
|
||||
Max_size_mb uint `mapstructure:"max_size_mb"`
|
||||
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 []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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user