POST api/Pos/Busi/Sell/BindingPic/Upload
上传图片时使用的API。 如果重复上传同一个序号的图片,原有的图片将被删除。 上传的图片将会被格式转换,转换成高质量的高度不超过600,宽度不超过800,JPG格式的图片另存。 上传后的文件可以通过获取静态资源文件的形式获取(文件路径=~/Upload/Pos/{BillNum.Replace("-","")}/BindingPic1.trim()),也可以通过GetSellBillImageAPI来获取。
Request Information
URI Parameters
None.
Body Parameters
PosSellBillBindingPicParm| Name | Description | Type | Additional information |
|---|---|---|---|
| ImageBuffer |
上传的图片的缓存区,我们将用这个Byte[]直接转换成一个流,通过这个流CreateBitMap()。 最大不能超过5M。 |
Collection of byte |
Required Max length: 5242880 |
| BillNum |
零售单据的单号。 |
string |
Required Max length: 20 |
| PicType |
上传的图片的序号,必须是1,2或3,对应到的图片为图片1,图片2,图片3。 |
string |
Required Max length: 1 Min length: 1 |
Request Formats
application/json, text/json
{
"ImageBuffer": "QEA=",
"BillNum": "sample string 1",
"PicType": "sample string 2"
}
application/xml, text/xml
<PosSellBillBindingPicParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <BillNum>sample string 1</BillNum> <PicType>sample string 2</PicType> <ImageBuffer>QEA=</ImageBuffer> </PosSellBillBindingPicParm>
application/x-www-form-urlencoded
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
上传图片时使用的API。 如果重复上传同一个序号的图片,原有的图片将被删除。 上传的图片将会被格式转换,转换成高质量的高度不超过600,宽度不超过800,JPG格式的图片另存。 上传后的文件可以通过获取静态资源文件的形式获取(文件路径=~/Upload/Pos/{BillNum.Replace("-","")}/BindingPic1.trim()),也可以通过GetSellBillImageAPI来获取。
CommonOperationResult| Name | Description | Type | Additional information |
|---|---|---|---|
| errcode |
错误代码,通常0表示成功,其他值表示错误。 |
integer |
None. |
| errmsg |
错误描述,当errcode不为零时,此值可以用于呈现给用户。 |
string |
None. |
| tag |
操作同时,服务器端需要返回的其他值。 |
string |
None. |
Response Formats
application/json, text/json
{
"errcode": 1,
"errmsg": "sample string 2",
"tag": "sample string 3"
}
application/xml, text/xml
<CommonOperationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer"> <errcode>1</errcode> <errmsg>sample string 2</errmsg> <tag>sample string 3</tag> </CommonOperationResult>
application/bson
Binary JSON content. See http://bsonspec.org for details.