<%@ Page Title="MIME Type Validation" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %>

<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">MIME Type Validation - AjaxUploader v5.0 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">MIME Type Validation</asp:Content>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

<div class="demo-card">
    <div class="demo-card-header">MIME Type Validation</div>
    <div class="demo-card-body">
        <p class="demo-description">
            Validate files by their MIME type using <code>EnableMimeCheck="true"</code>. This checks
            the actual content type rather than just the file extension, providing stronger security.
        </p>

        <au:AjaxFileUpload ID="Uploader1" runat="server"
            EnableMimeCheck="true"
            AllowedExtensions=".jpg,.png,.gif,.pdf"
            ButtonText="Select File (images/PDF only)"
            AutoUpload="true"
            ShowProgress="true" />

        <div class="code-panel">
            <pre><code>&lt;au:AjaxFileUpload ID="Uploader1" runat="server"
    EnableMimeCheck="true"
    AllowedExtensions=".jpg,.png,.gif,.pdf"
    ButtonText="Select File (images/PDF only)"
    AutoUpload="true"
    ShowProgress="true" /&gt;</code></pre>
        </div>

        <p class="mt-3 text-muted">
            MIME checking verifies the actual file content matches the extension, preventing
            renamed files from bypassing extension-based validation.
        </p>
    </div>
</div>

</asp:Content>
