Can I use an outputstream when adding file to attachment table?

I want to add an attachment to an item but want to use an outputstream instead of a file as parameter to the createRow () call.

ITable attTable = ((IItem) item).getAttachments();

get an OutputStream ops from another place ….

atttable.createRow(ops);   // This call will get a invalid parameter exception ….

My intention is to avoid saving a temp file from the output stream.

Any idea is very much appropriated!

Agile version is 9.3.4

Alex

Add Comment
1 Answer(s)

You’ll need to use an inputstream to add an attachment, so try piping the outputstream to an inputstream. There are a lot of answers on this by searching Google.

Agile Angel Answered on July 13, 2020.

@keithrust

 

Thanks a lot for the quick replay!

on July 13, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.