hotfix: 临时修复文件扩展名识别错误的问题
This commit is contained in:
父節點
29ea61034a
當前提交
2d14222073
@ -1,10 +1,10 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/google/uuid"
|
||||
"integrity-checkin/data/po"
|
||||
"integrity-checkin/pkg/app"
|
||||
"integrity-checkin/pkg/util"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -116,9 +116,10 @@ func (c CheckinService) UploadFile(aw *app.Wrapper) app.Result {
|
||||
if err != nil {
|
||||
return aw.Error(err.Error())
|
||||
}
|
||||
if err = util.ValidateFilename(formFile.Filename); err != nil {
|
||||
return aw.Error(err.Error())
|
||||
}
|
||||
fmt.Println(formFile.Filename)
|
||||
//if err = util.ValidateFilename(formFile.Filename); err != nil {
|
||||
// return aw.Error(err.Error())
|
||||
//}
|
||||
if _, err = os.Stat("files"); err != nil {
|
||||
err = os.Mkdir("files", 0666)
|
||||
if err != nil {
|
||||
|
載入中…
x
新增問題並參考
Block a user