Hi,
Please assist. I need to be able to upload a new file to a newly created document in eB using C#.
I noticed the eB.ContentData.File class. Can I use this?
If possible please provide some code snippets or a sample C# project solution.
Regards
JS
Note, i'm using v15.5.1
Hi Jemaine,
Yes, you can use eB.ContentData.file class for upload in v15.5.1.
Answer Verified By: Jemaine Shezi
Jemaine,Please check the below Snippet. I hope it would be of any help:
eB.Data.Document eBDoc = new eB.Data.Document(_ses, docID);eBDoc.Retrieve("Header;Files");eB.Data.File nf = new eB.Data.File(_ses);eB.ContentData.File cf = new eB.ContentData.File(nf, txtFileName, eB.ContentData.File.FileOperation.Upload);nf.ContentData = cf;nf.Document = eBDoc;nf.Save();eBDoc.Save();
Hi Manav,
Many thanks. This works well.
Happy to help. Have a Great day!