Vulnerability in EPiServer.Forms
I am a newbie in Episerver, I have made an import from "Digimaker CMS" to "Episerver".
I found the "Author" and "Description" properties are empty.
How can I update their values?
I have an XML file with all the values I need to add. for example
<Image ID="10520" Author="myAuthor" Description ="myDescription" Width="100" Height="740" Path="Pictures\miljojournalistene_10520_GK1T41.gif" />
My plan is :
1) Read the xml file image by image
2) pick the file name of the image and locate it in Episerver.
3) Update its Author and Description values.
Could you please correct me?
Thanks in advance
The format of metadata fields of files in EPiServer is defined in FileSummary.config in your website root.
What you need to do is to modify the file summary of each uploaded file. Basically something like this:
var file = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile("mypath/myfile.jpg") as UnifiedFile;file.Summary.Author = "John Connor"; // All fields defined in FileSummary.config will appear as properties of Summary.
// You can define custom fields by adding to the Dictionary property like this:file.Summary.Dictionary["MyCustomField"] = "Gangnam Style";
Try these blog posts on the FileSummary.config file and how to work with it: