I can upload the documents from external application to the Appian.
When try to open the received documents with file extensions .docx,.pdf,.pptx, the files are throwing error and after I select "Repair" option, then the files are opened.
But the files with extension .xlsx,.zip,.png,.bmp are not opening and its throwing "file format or file extension is not valid" error and unable to open the files.
Step 1: By using, "Document Upload" Web API can receive document from external application to Appian.
a!startProcess( processModel: cons!DSC_UPLOAD_CWR_DOCS, processParameters: { transcript: http!request.body, cwrId: http!request.queryParameters.cwrId, documentType:http!request.queryParameters.documentType, }, onSuccess: a!httpResponse( statusCode: 200, headers: {}, body: concat( "Upload Successful: ", document(http!request.body, "id"), " - ", document(http!request.body, "name"), ".", document(http!request.body, "extension") ) ),
Step 2: Process Model which receives the document details and uploaded in the application
Set Document Details: - Map the received document details to the CDT
Move Document: - Move the received document to the custom folder. Document uploaded with its original size.
Write Document: - Add document details to the database
Able to see the document in the UI
I downloaded the documents from document folder and also directly from application. Got the below error when I tried to open the downloaded documents
When I select Ok/Yes from the error window, the files with extensions .docx,.pdf,.pptx are opened. But files with extensions .xlsx,.zip,.png,.bmp are not opened.
Any suggestions to fix this issue.
Discussion posts and replies are publicly visible
I am missing details. Can you help me with some?
Added more details
Did you follow this approach?
https://docs.appian.com/suite/help/24.2/passing-a-web-api-document-into-a-process-model.html
Did you enable this checkbox?
Yes, I created the Web API with the help of the link which you mentioned above.
Yes the checkbox is checked.
OK. Does the other system actual post the files in binary? Or is it using a base64 encoding?
I used Postman to send files to Appian.
Try "binary" instead of "form-data".
As Stephan said, change this to binary
Thank you!. Its working
Thank you! Its worked.
Need clarification, whether can we upload multiple files via Web API?
AFAIK that is not supported.