|
@@ -155,6 +155,10 @@ func (this *ReportPdfController) UploadPdf() {
|
|
br.Msg = "文件格式不正确"
|
|
br.Msg = "文件格式不正确"
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if h.Size > 1024*1024*15 {
|
|
|
|
+ br.Msg = "文件大小不能超过15M"
|
|
|
|
+ return
|
|
|
|
+ }
|
|
dateDir := time.Now().Format("20060102")
|
|
dateDir := time.Now().Format("20060102")
|
|
uploadDir := utils.STATIC_DIR + "dongwu/" + dateDir
|
|
uploadDir := utils.STATIC_DIR + "dongwu/" + dateDir
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|
|
err = os.MkdirAll(uploadDir, utils.DIR_MOD)
|