文件上传增加错误信息返回
Former-commit-id: 474a2bc77ba597a0e41cc3e5407b776b0dffaf0b
This commit is contained in:
parent
5b10e312d2
commit
597ffb1489
|
|
@ -25,6 +25,11 @@ var uploadTempPath = filepath.Join(uploadPath, "temp")
|
|||
func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
file, fileHeader, err := r.FormFile("file")
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
result2.HttpResult(r, w, nil, err)
|
||||
return
|
||||
}
|
||||
index := r.PostFormValue("index")
|
||||
hash := r.PostFormValue("hash")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue