Category / Section
Why extensions-allow property in the ASP.NET Web Forms upload box does not work in Edge browser?
1 min read
In the UploadBox control, the input upload element uses “accept” attribute to allow only specified file types, when the extensions-allow property is set in the control. The input element’s “accept” attribute is not supported in Edge browser. Refer to the following MSDN link.
Consider the following example,
<ej-upload-box id="UploadDefault" save-url="UploadFiles" extensions-allow=".pdf"> </ej-upload-box>
In the previous code, the extensions-allow property is set to ".pdf". So, the accept attribute will be set to “.pdf” in the Upload’s input element. This will not work in Edge browser and when selecting the files, all file types will be displayed. If any other file type is selected instead of PDF, it will not be received by the controller. If the selected file is PDF document, then it will be uploaded properly.