November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hi KK, The stack trace should hopefully show up in the logs to help you along.
Have you got the Content Model setup to accept an png file.
e.g.
using EPiServer.Framework.DataAnnotations;
using ImagePointEditor;
using System.ComponentModel.DataAnnotations;
namespace Temp5.Models.Media;
[ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")]
public class ImageFile : ImageData
{
/// <summary>
/// Gets or sets the copyright.
/// </summary>
/// <value>
/// The copyright.
/// </value>
public virtual string Copyright { get; set; }
[UIHint(ImagePoint.UIHint)]
[Display(Name = "Focal point")]
public virtual string ImageFocalPoint { get; set; }
}
See here for documentation on the subject : Media types and templates (optimizely.com)
Hi
I have the same issue, got the mediatypes registered as well. If I start an empty Optimizely project i get the same result, also after adding the mediatypes. Alloy and Foundations works fine.
/P
[ContentType(GUID = "7182DAC0-33F2-441E-AEDF-0C3259D49DBC")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,gif,bmp,png")]
public abstract class SiteImageData : ImageData
{
[Display(
Order = 10)]
[CultureSpecific]
public virtual string Alt { get; set; }
}
@Pär remove the abstract declaration from your class.
[ContentType(GUID = "7182DAC0-33F2-441E-AEDF-0C3259D49DBC")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,gif,bmp,png")]
public class SiteImageData : ImageData
{
[Display(
Order = 10)]
[CultureSpecific]
public virtual string Alt { get; set; }
}
Hi guys,
I tried to upload a png file to cms through the asset pane.
Login --> Edit --> Asset Pane --> For All Sites --> Media --> Upload Files --> select the png file (2.8 KB) --> Failed with msg 'Object Reference not set to an instance'
Any advice would be appreciated.
Thanks