upload type
This commit is contained in:
parent
2c7d0d3b09
commit
743ac6a55f
|
|
@ -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.GetHeader("upload_type")
|
uploadType := c.Request.Header.Get("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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue