customFileSummary in virtualPath element

Vote:
 
Hi, In web.config file there is a virtualPath element with attribute customFileSummary="~/FileSummary.config". What is this customFileSummary used for? I tried to find some reference about it, but it seems to me that it is not used at all. Thanks, Martin Kulov ProPeople Aps
#15949
Jan 07, 2008 15:36
Vote:
 
Hi Martin! The custom file summary is used if you want to change the form/values that are used to define meta data for files. The .config file is an xform definition that loads an xform that is used to create the meta data form. As of today, you have to change the xform definition by your self (you can modify the existing .config file) but we are currently working on an export function to be able to export an xform directly to an xml file.
#16676
Jan 07, 2008 15:49
Vote:
 
Thanks Linus, Can you tell me where this metadata is used? What is its purpose? I am little unaware of this feature. Where can I read more? Thanks, Martin Kulov ProPeople Aps
#16677
Jan 07, 2008 16:50
Vote:
 
Hi Martin! Read more in my blog about how you can work with uploaded files within EPiServer: http://blog.fredrikhaglund.se/blog/2007/12/05/episerver-using-the-new-unified-file-system/ Each UnidfiedFile object has a Summary property that you can use to access meta data about the file that is stored in the database (i.e. Author, Category, Comments, Keywords, Subject and Title) These properties can be edited through the file manager if you provide a valid FileSummary.config in the customFileSummary attribute of the virtualPath element. You can also edit the meta data from you own code. Remember to call SaveChanges() to make the change persistent. (Calling SaveChanges will also queue the file for reindexing so your changes to keywords, etc will be searchable.) There is also a Dictionary property that allows you to add your own meta data. UnifiedFile file = HostingEnvironment.VirtualPathProvider.GetFile(virtualPath) as UnifiedFile; file.Summary.Comments = "Changed from code"; file.Summary.Dictionary["ImageWidth"] = 1234; file.Summary.SaveChanges(); All values are stored in a hashtable so access is quite fast but the file object itself is serialized to and from the database so I would keep an eye open for performance issues because I do not know how well the caching works and of course, updates would always trigger database activity. Also worth to mention is that uploaded files are versioned and each version can have a diffrent set of meta data. Regards, Fredrik Haglund INEXOR AB - http://blog.fredrikhaglund.se/
#16678
Jan 07, 2008 20:58
Vote:
 
Thanks Fredrik!
#16679
Jan 10, 2008 11:50
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.