CenterWSServerBS

<back to all web services

UploadAttachmentRequest

单独附件上传接口

Requires Authentication
The following routes are available for this service:
POST/UploadAttachment
UploadAttachmentRequest Parameters:
NameParameterData TypeRequiredDescription
AttachmentbodyAttachmentModelNo
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)
UploadAttachmentResponse Parameters:
NameParameterData TypeRequiredDescription
IsSuccformboolNo是否成功
FilePathformstringNo附件上传后的路径
ErrMsgformstringNo失败信息等

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

HTTP + XML

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

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

<UploadAttachmentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenterWSServerBS.ServiceModel">
  <Attachment>
    <Attachment>AA==</Attachment>
    <AttachmentBase64>String</AttachmentBase64>
    <CacheKey>String</CacheKey>
    <Data xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Data>
    <Status>0</Status>
    <Table>String</Table>
  </Attachment>
</UploadAttachmentRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UploadAttachmentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenterWSServerBS.ServiceModel">
  <ErrMsg>String</ErrMsg>
  <FilePath>String</FilePath>
  <IsSucc>false</IsSucc>
</UploadAttachmentResponse>