POST api/UploadImg/xcxUpLoadOneImg?token={token}&uid={uid}&type={type}

小程序用。上传一张图片,返回图片id

Request Information

URI Parameters

NameDescriptionTypeAdditional information
token

string

Required

uid

integer

Required

type

IMGTYPE

Default value is xcxnews

Body Parameters

None.

Response Information

Resource Description

uploadImgResult
NameDescriptionTypeAdditional information
imgUrl

string

None.

imgId

integer

None.

code

状态码,200成功,300错误,400缺少参数,500没有权限,301数据不存在...

integer

None.

msg

成功或者错误的说明,例如:登录成功,token过期...

string

None.

Response Formats

application/json, text/json

Sample:
{
  "imgUrl": "sample string 1",
  "imgId": 1,
  "code": 2,
  "msg": "sample string 3"
}

application/xml, text/xml

Sample:
<uploadImgResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Controllers">
  <code xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">2</code>
  <msg xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">sample string 3</msg>
  <imgId>1</imgId>
  <imgUrl>sample string 1</imgUrl>
</uploadImgResult>