Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Image properties "Author" and "Description"



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

Feb 11, 2013 20:23

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:

  • (written for CMS 5 but still valid for CMS 6 I think)
Edited, Feb 12, 2013 13:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.