Hi,
If you have ever store any file via SmartObject into a database, you should notice that K2 stores the file in the following format:
<file>
<name>FILENAME</name>
<content>BASE64_ENCODED_STRING</content>
</file>
The entire file you want to upload gets base64 encoded, which produce a long string. This long string is then saved into the database.
I have never tested file downloads from an API in K2, but I suspect your API will need to return the file in a format similar to what I have shown above.
Dear,
thank you for the solution. I managed the requirment by creating a service broker to read from an API and generate the file using XML and store inside a smartobject.
regards.