shouldBind 修改为 shouldBindJSON 防止浏览器ajax交互时 content-type出现偶发性不同的问题
This commit is contained in:
@@ -56,7 +56,7 @@ func UploadFile(c *gin.Context) {
|
||||
// @Router /fileUploadAndDownload/deleteFile [post]
|
||||
func DeleteFile(c *gin.Context) {
|
||||
var file dbModel.ExaFileUploadAndDownload
|
||||
_ = c.ShouldBind(&file)
|
||||
_ = c.ShouldBindJSON(&file)
|
||||
err, f := file.FindFile()
|
||||
if err != nil {
|
||||
servers.ReportFormat(c, false, fmt.Sprintf("删除失败,%v", err), gin.H{})
|
||||
|
Reference in New Issue
Block a user