This commit is contained in:
2024-04-09 18:07:19 +08:00

View File

@@ -213,6 +213,14 @@ func UploadSoftwareMultiFile(w http.ResponseWriter, r *http.Request) {
services.ResponseNotFound404UriNotExist(w, r)
return
}
sql := fmt.Sprintf("select * from ne_software where ne_type='%s' and version='%s'", neTypeUpper, version)
neSoftwareInfo, _ := dborm.XormGetDataBySQL(sql)
if len(*neSoftwareInfo) >= 1 {
services.ResponseInternalServerError500ProcessError(w, fmt.Errorf("ne_software version has exits"))
return
}
md5Param := services.GetUriParamString(r, "md5Sum", ",", false, false)
softwarePath := fmt.Sprintf("%s/%s", config.GetYamlConfig().OMC.Software, neTypeLower)