Example of File Restriction in ASP.NET MVC Image Editor Control

This sample demonstrates the file restriction feature in the Image Editor component, which allows customization of file extensions, minimum and maximum file sizes, and drag-and-drop functionality.

DEMO
SOURCE




This sample highlights the enhanced configuration capabilities of the Image Editor component through the UploadSettings property. The following features are included:

  • File Extensions: Use a multi-select dropdown with checkboxes to dynamically choose the allowed file extensions. Supported values include jpeg, jpg, png, svg, and webp.
  • File Size: Two numeric textboxes are provided at the top of the page to set the minimum and maximum file sizes (in bytes). These values dynamically update the uploadSettings property.
  • Dynamic Updates: Changes made to the numeric textboxes or the dropdown options immediately reflect in the component's uploadSettings.
  • Upload Settings: Predefined settings include:
    • Allowed Extensions: .jpeg, .png, .svg, .webp
    • Minimum File Size: 1 KB
    • Maximum File Size: 100 KB

More information about ImageEditor can be found in this documentation sectionopens in a new tab.

Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab