Max File Size Validation
Limit the maximum file size using the asp-max-size attribute. Supports human-readable values like "2MB", "500KB", or "1GB". Files exceeding the limit are rejected before upload.
What you should see: anything over 2 MB is refused the moment it is selected — no request is made and no time is wasted uploading a file the server would reject.
Max 2 MB
Drag & drop files here, or paste from clipboard
Max 500 KB
Drag & drop files here, or paste from clipboard
<core-upload asp-upload-url="/api/upload/upload"
asp-max-size="2MB"
asp-progress="true"
asp-button-text="Select File (max 2MB)">
</core-upload>
<core-upload asp-upload-url="/api/upload/upload"
asp-max-size="500KB"
asp-button-text="Select File (max 500KB)">
</core-upload>