I know we can create file upload web API to get files in Binary, but is it possible to get file using body of the api as formdata of json
Discussion posts and replies are publicly visible
No,Web APIs cannot receive files through JSON body. Files must be sent as binary or multipart/form-data. JSON is a text-based format that cannot encode binary file data, while files require binary transmission
Can't we send file as base64 format in JSON body?Also can you guide how can I leverage multipart/form-data for sending file in Web API body, I am creating Web API in appian how do I have to pass the values in the body so that Appian can store the file?
adityan0002 said:Can't we send file as base64 format in JSON body?
Yes, you absolutely can send files as base64 format in JSON body.I got your requirement now,Have you tried creating Web API by this option which will guide you easily.
Yes I have tried it but this only accepts file as a binary, but the request payload(body) have to be in this format
{ "file": {}, "externalInfo": {} }