Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: How to Preventing File Upload or Removal in Uploader Component | Syncfusion
title: How to Prevent Uploading or Removing in Uploader | Syncfusion
description: Checkout and learn here how to Preventing File Upload or Removal in Uploader Component in Syncfusion Blazor File Upload component and more.
platform: Blazor
control: File Upload
Expand All @@ -24,11 +24,13 @@ We can prevent the selected file from being uploaded and also prevent the remova
@code {
private void BeforeUploadHandler(BeforeUploadEventArgs args)
{
// Here, you can customize your code.
// You can prevent uploading by setting "Cancel" as true
args.Cancel = true;
}
private void BeforeRemovehandler(BeforeRemoveEventArgs args)
{
// Here, you can customize your code.
// You can prevent removing by setting "Cancel" as true
args.Cancel = true;
}
}
```
Expand All @@ -44,11 +46,13 @@ We can prevent the selected file from being uploaded and also prevent the remova
@code {
private void BeforeUploadHandler(BeforeUploadEventArgs args)
{
// Here, you can customize your code.
// You can prevent uploading by setting "Cancel" to true.
args.Cancel = true;
}
private void BeforeRemovehandler(BeforeRemoveEventArgs args)
{
// Here, you can customize your code.
// You can prevent removing by setting "Cancel" as true
args.Cancel = true;
}
}
```