public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            if (!builder.FieldType.Equals(typeof(MediaLibraryUploadField).Name)) yield break;

            var model = new MediaLibraryUploadFieldSettings();
            if (updateModel.TryUpdateModel(model, typeof(MediaLibraryUploadFieldSettings).Name, null, null))
            {
                builder.WithSetting("MediaLibraryUploadFieldSettings.Hint", model.Hint);
                builder.WithSetting("MediaLibraryUploadFieldSettings.Required", model.Required.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("MediaLibraryUploadFieldSettings.Multiple", model.Multiple.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("MediaLibraryUploadFieldSettings.AllowedExtensions", model.AllowedExtensions);
                builder.WithSetting("MediaLibraryUploadFieldSettings.FolderPath", model.FolderPath);
                builder.WithSetting("MediaLibraryUploadFieldSettings.MaximumSizeKB", model.MaximumSizeKB.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.ImageMaximumWidth", model.ImageMaximumWidth.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.ImageMaximumHeight", model.ImageMaximumHeight.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.MediaProfile", model.MediaProfile);
            }

            yield return DefinitionTemplate(model);
        }
        public override IEnumerable<TemplateViewModel> PartFieldEditorUpdate(ContentPartFieldDefinitionBuilder builder, IUpdateModel updateModel)
        {
            if (!builder.FieldType.Equals(typeof(MediaLibraryUploadField).Name)) yield break;

            var model = new MediaLibraryUploadFieldSettings();
            if (updateModel.TryUpdateModel(model, typeof(MediaLibraryUploadFieldSettings).Name, null, null))
            {
                builder.WithSetting("MediaLibraryUploadFieldSettings.Hint", model.Hint);
                builder.WithSetting("MediaLibraryUploadFieldSettings.Required", model.Required.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("MediaLibraryUploadFieldSettings.Multiple", model.Multiple.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("MediaLibraryUploadFieldSettings.AllowedExtensions", model.AllowedExtensions);
                builder.WithSetting("MediaLibraryUploadFieldSettings.FolderPath", model.FolderPath);
                builder.WithSetting("MediaLibraryUploadFieldSettings.MaximumSizeKB", model.MaximumSizeKB.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.ImageMaximumWidth", model.ImageMaximumWidth.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.ImageMaximumHeight", model.ImageMaximumHeight.ToString());
                builder.WithSetting("MediaLibraryUploadFieldSettings.MediaProfile", model.MediaProfile);
            }

            yield return DefinitionTemplate(model);
        }