CenterWSServerBS

<back to all web services

UploadBatchAttachmentRequest

批量附件上传接口

Requires Authentication
The following routes are available for this service:
POST/UploadBatchAttachment
UploadBatchAttachmentRequest Parameters:
NameParameterData TypeRequiredDescription
BatchAttachmentbodyList<AttachmentModel>No
AttachmentModel Parameters:
NameParameterData TypeRequiredDescription
TableformstringNo表名
DataformDictionary<string, string>No上传的数据key为字段名,value为字段值(对应表必须字段:CUSTOMID,ITEMNAME,SYSPRIMARYKEY,REPORTNUM...REPORTPSTHSECOND)
Attachmentformbyte[]No附件数据(byte[]) dll调用
AttachmentBase64formstringNo附件数据(Base64字符串)Http Json调用
CacheKeyformstringNo附件缓存唯一Key,客户端要保存
StatusformintNo附件状态 0:第一段 1:中间段 2:结束端(只有一段传2)
UploadBatchAttachmentResponse Parameters:
NameParameterData TypeRequiredDescription
AllSuccformboolNo是否都成功
ErrMsgformstringNo失败信息等
ResultformList<ItemUploadResult>No上传结果
ItemUploadResult Parameters:
NameParameterData TypeRequiredDescription
TableformstringNo表名
FilePathformstringNo附件上传后的路径
IsSucformboolNo是否成功
msgformstringNo失败信息等

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /UploadBatchAttachment HTTP/1.1 
Host: gxzj.service.jyjzqy.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"BatchAttachment":[{"Table":"String","Data":{"String":"String"},"Attachment":"AA==","AttachmentBase64":"String","CacheKey":"String","Status":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"AllSucc":false,"ErrMsg":"String","Result":[{"Table":"String","FilePath":"String","IsSuc":false,"msg":"String"}]}