Question

Attachment content reading

Hello all,

I would like to know how to get a file handle for the attachment in the specific section to the server side, because I would like the read the content of the file and do some action based on this content.

I mean I need an analogy of:
    var myStream = new StreamReader("Example.txt")
but for the file that corresponds to this file:
    SELECT * FROM dbo.contactFile where ID='someGUID';

I have seen several mentions about FileApiService, but I can't seem to find any documentation and use cases for it.

Like 0

Like

2 comments

Hi Marian, 

 

As far as I know we don't have such method implementation in our out-of-the-box logic.

 

Therefore the better way to solve this case:

 

If you need to get some data and work with it in the file, you can perform the query(SELECT * FROM dbo.contactFile where ID='someGUID';) and save it to some varrible (eg. "result"),

 

then by putting this result to your "StreamWriter" and read it with "StreamReader" for your further actions.

 

Best Regards, 

 

Bogdan L.
 

Hello Bogdan, thank you for your answer, this is exactly how we have solved it in January. 

Show all comments