I'm using an endpoint assembly to return a file content (byte array or stream string).
Unable to map the filecontent to file attachment control.
Method: public static string DownloadFile()
I believe you would need to convert the file to base64 and encapsulate it inside a particular xml object before returning it to K2.
You can search for what the file object looks like, or to find out what this looks like yourself, create a smartobject to link to a DB table you have control over, Set one column in the table to NVARCHAR(max) and the mapped smartobject field to type File and upload a file via this.
You would also need your final smartobject field to be set to type File.