|
|
@@ -25,6 +25,11 @@ var uploadTempPath = filepath.Join(uploadPath, "temp") |
|
|
func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
|
|
func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
|
|
return func(w http.ResponseWriter, r *http.Request) { |
|
|
return func(w http.ResponseWriter, r *http.Request) { |
|
|
file, fileHeader, err := r.FormFile("file") |
|
|
file, fileHeader, err := r.FormFile("file") |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
logx.Error(err) |
|
|
|
|
|
result2.HttpResult(r, w, nil, err) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
index := r.PostFormValue("index") |
|
|
index := r.PostFormValue("index") |
|
|
hash := r.PostFormValue("hash") |
|
|
hash := r.PostFormValue("hash") |
|
|
|
|
|
|
|
|
|