Form submission is missed uploaded files

  • Updated

Issue Description:

The form is successfully submitted with one or multiple files. But when viewing the submission, the form seems to have failed to save the files and the uploaded file was empty.


In the form, you allow to upload with different file types such as (.png, .pdf, .jpg, .mp4), but in CMS you only allow uploading files with extension (.png, .pdf, .jpg) without allowing uploading of .mp4 files. So when using the form to upload .mp4 files, it will be failed to save that file to blob.


You need to define the media types in your content model like below:

using EPiServer.Core;using EPiServer.DataAnnotations;
using EPiServer.Framework.DataAnnotations;
using System;

namespace EP170621.Models.Media
    [ContentType(GUID = "EE3BD195-7CB0-4756-AB5F-E5E223CD9820")]
  [MediaDescriptor(ExtensionString = "pdf,png,jpg,mp4")]
    public class GenericMedia : MediaData
        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        public virtual String Description { get; set; }

For the reference: