Problems with uploading webApi documents
Hello,
We have a problem when uploading a document with a webApi, to do the test we are using postman, we pass the document to it, we pass it the name and the extension as follows:


We see that it goes up to the folder that we have indicated in appian, but when we try to download it to open it, it tells us the following:


I have tried with jpg and the same thing happens to me:

code:
a!localVariables(
/*Check whether the request body contains a document*/
local!success: not(isnull(http!request.body)),
if(
local!success,
/*If a document was uploaded, return a successful response*/
a!httpResponse(
statusCode: 200,
headers: {},
/*Print the document id, name, and extension of the uploaded document*/
body: concat(
"Upload Successful: ",
document(http!request.body, "id"),
" - ",
document(http!request.body, "name"),
".",
document(http!request.body, "extension")
)
),
/*If no document was uploaded, return an error code*/
a!httpResponse(
statusCode: 400,
headers: {},
body: "400 Document Not Provided"
)
)
)
So I do not know if we have to report some more header or something we are not doing correctly.
Can you give us a hand with this?
A greeting and thanks in advance!
