Compare commits

..

No commits in common. "aa92e682969bd6846cca4a22bb19e2e2b2a57f1c" and "7cd3a36d7291ca1121d58ad64eac4f921ca40d83" have entirely different histories.

1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ func UploadFile(c *gin.Context) {
id, _ := c.Get("id") id, _ := c.Get("id")
id1 := int(id.(float64)) id1 := int(id.(float64))
//从请求头获取upload_type //从请求头获取upload_type
uploadType := c.Request.Header.Get("upload_type") uploadType := c.GetHeader("upload_type")
if uploadType == "" { if uploadType == "" {
c.JSON(http.StatusOK, gin.H{"error": "upload_type is empty", "code": proto.ParameterError, "message": "failed"}) c.JSON(http.StatusOK, gin.H{"error": "upload_type is empty", "code": proto.ParameterError, "message": "failed"})
return return