achand
Novice

Endpoint Assembly method returning a file content (byte array or stream string) unable show on view

HI All,

 

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.

 

Please help.

 

Method: public static string DownloadFile()


capture_3488.png
0 Kudos
Reply
2 Replies
Compagno
Scholar

Re: Endpoint Assembly method returning a file content (byte array or stream string) unable show on view

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.

0 Kudos
Reply
ThinusC
Nintex Employee
Nintex Employee

Re: Endpoint Assembly method returning a file content (byte array or stream string) unable show on view

Hi achand

Not exactly the same as what you are trying to achieve, but the following post might have some ideas to point you in the right direction.
https://community.k2.com/t5/General/I-need-to-generate-a-Text-File-from-a-K2-Form-similar-to-the-PDF...
0 Kudos
Reply