AppendAttacment
≥4.8.1
Interface Function
Append an attachment to the specified Document.
Request Parameter
Parameter | Type | Required | Remarks |
---|---|---|---|
FormAlias | string | true | Specify the Form that Document belongs to. Form alias, the identity of the form |
DataId | string | true | Specify the operating Document ID |
UserName | string | true | Operator Name |
UserId | string | true | Operator StaffCode |
AttachmentFiledName | string | true | Attachment field name |
Data | Dictionary<string, object> |
true | Attachment information |
Data Description
Field Name | Type | Remarks |
---|---|---|
fileName | string | File name |
fileStream | Stream | File byte stream |
fileUUID | string | The file identifier can be specified as a GUID. If not specified, the interface is automatically generated. The attachment can be downloaded by calling DownloadAttachment through this field. |
totalSize | long | File size |
Return Data Type
Refer to the return sample
Note
The attachment types that can be converted to HTML are: "PPTX","PPT","XLSX","XLS","DOCX","DOC","PDF","CSV","JPG","JPEG","PNG".
The system will judge the type of the corresponding control according to the specified AttachmentFiledName, and automatically process the logic of converting to html.
This method does not support multipart uploads.
Input Sample
{
"FormAlias": "DemoFormAlias",
"DataId": "1191c1e6212442d48b21b6e50ebc937a",
"UserName": "DemoUser",
"UserId": "DemoUser",
"AttachmentFiledName": "File",
"Data": {
"fileName": "demo.jpg",
"fileUUID": "",
"totalSize": 51675,
//This value is not the correct file stream, only for demo. MemoryStream to Base64 string
"fileStream": "/9j/4AAQSkZJRgABAgEASABIAAD/4QFIRXhpZgAASUkqAAgAAAAIADEBAgAsAAAAbgAAADIBAgAUAAAAmgAAAGmHBAABcDigZ//Z"
}
}
Return Sample
{
"StatusCode": 200,
"Info": "Request (or process) succeeded",
"Data": {
"entityName": "a",
"dataId": "1191c1e6212442d48b21b6e50ebc937a",
"result": 1,
"msg": "Process successed"
}
}