Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

How do I add an unsorted attachment in kentico 11 from bytestream?

$
0
0
I am importing a bunch of pages from an older kentico 7 site to a new kentico 11 install (portal to mvc, however the current program is a simple migration script).I've got a database connection to the kentico 7 site and i can pull all the images for each page from the varied places that they were previously stored, but I'd like to clean things up for the new system and store all the images as document attachments this time around. I have all the images as byte streams and would like to use the Kentico API to insert them. I found https://devnet.kentico.com/articles/add-attachment-from-binary-object and that seems to be what I want except it only works in Kentico 5-7. I also tried to follow the documentation in https://docs.kentico.com/api11/content-management/attachments however that wants me to run System.Web.HttpContext.Current.Server.MapPath("/FileFolder/file.png");The above is a bit weird when running a console app...Is there a way to just attach an AttachmentInfo object to a tree node in Kentico 11?

Viewing all articles
Browse latest Browse all 8832

Trending Articles