Skip to Content
Jan 14, 2021 at 12:14 AM

Uploading from CAP to DMS


Hi everyone,

We're trying to send a file from our UI5 Application to a CAP Server and then store it in DMS. We send the file to the CAP Server as a BASE64 Encoded String and then convert the String to a Buffer in the CAP/Node layer. We're using the FormData and Axios package to then send the file to DMS but once it arrives to DMS it is corrupted (despite receiving a 200 response from the DMS layer). We've done this previously except used XSJS in the place of the NodeJS/CAP layer and in the past have just used the .setBody() member method of "WebEntityRequest". .setBody() accepts a primitive JavaScript type or ArrayBuffer. Does anyone know what format/encoding that .setBody() converts the ArrayBuffer to before sending it to DMS or have another solution in mind?