Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks Plug-in for REST and JSON | 2.1.0, 2.0.0 |
1). Base64 encodes the file at use Invoke REST API to send the binary content to the REST Server.
2). Send the file first in a multipart/form-data POST and return an ID to the client. The client then sends the metadata with the ID and the server reassociates the file and the metadata.
Below is the detailed explanation for the sample project
The REST Client process is the client process that reads a .xlsx file into binary content and uses Render JSON activity to render the .xlsx file content and file information into a JSON string. Then use Invoke REST API to send the JSON string to the REST Server;
The Rest Server process is the Server process, which receives the HTTP request from the client and maps the JSON content in the HTTP request to the Subprocess “Persit on the disk.process”, in the subprocess we use Parse JSON activity to parse the JSON content, then use Write File activity to store the file content in the disk.