Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

ImageEditor don't copy filesummary?



      <Author />
      <Publisher />
      <Description />


When users upload images, they enter photographer under Author in EPiServer's filemanager->Edit fileinfo. When I copy->paste a file in EPiServers filemanager, the fileinfo is copied as well. But when I insert an image into an article, open EPiServers ImageEditor, resize the image, and save a copy in the pagefolder, the fileinfo is not copied. Is this a bug/missing functionallity in EPiServers ImageEditor? I think the file is saved in EPiServer.UI.Edit.ImageEditor.Core.FileIO.SaveFileAs():

    public static void SaveFileAs(string originalVirtualPath, string newVirtualPath, List<ImageOperation> imageOperations, int jpegQuality, PageReference pageForPageFolder)
      string mimeMapping = EPiServer.Web.MimeMapping.GetMimeMapping(newVirtualPath);
      byte[] buffer;
      using (Stream stream = HostingEnvironment.VirtualPathProvider.GetFile(originalVirtualPath).Open())
        byte[] numArray = new byte[stream.Length];
        stream.Read(numArray, 0, (int) stream.Length);
        buffer = new ImageServiceClient("ImageServiceClientEndPoint").RenderImage(numArray, (IEnumerable<ImageOperation>) imageOperations, mimeMapping, 1f, jpegQuality);
      UnifiedFile unifiedFile = HostingEnvironment.VirtualPathProvider.GetFile(newVirtualPath) as UnifiedFile ?? (HostingEnvironment.VirtualPathProvider.GetDirectory(VirtualPathUtility.GetDirectory(newVirtualPath)) as UnifiedDirectory).CreateFile(VirtualPathUtility.GetFileName(newVirtualPath));
      if (!PageReference.IsNullOrEmpty(pageForPageFolder))
      using (Stream stream = unifiedFile.Open(FileMode.OpenOrCreate, FileAccess.Write))
        stream.Write(buffer, 0, buffer.Length);
      IVersioningFile versioningFile = unifiedFile as IVersioningFile;
      if (versioningFile == null || !versioningFile.IsCheckedOut)


Do you have a suggestion for a workaround?

EPiServer 6 R2 (6.1.379.0)


Jun 27, 2013 10:58

Here is a proposed BUGFIX/SOLUTION: Add the following two lines in EPiServer.UI.Edit.ImageEditor.Core.FileIO's SaveFileAs()-method (at line 16 in my previous post):

var originalUnifiedFile = HostingEnvironment.VirtualPathProvider.GetFile(originalVirtualPath) as UnifiedFile;
UnifiedFile.CopySummary(originalUnifiedFile, unifiedFile);


Looks like a simple fix, is it possible to get this fixed in the next version? :)

Edited, Jul 03, 2013 14:18
* 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.