Restrict drag and drop upload
20 Feb 20251 minute to read
In the Blazor File Manager component, you are able to prevent the external drag and drop upload action for any types of files or folders by setting the DropArea property as null
in the FileManagerUploadSettings
class.
The following example demonstrates how to prevent the external drag and drop upload actions for all types of files in the Blazor File Manager component.
@using Syncfusion.Blazor.FileManager
<SfFileManager TValue="FileManagerDirectoryContent">
<FileManagerAjaxSettings Url="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/FileOperations"
UploadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Upload"
DownloadUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/Download"
GetImageUrl="https://ej2-aspcore-service.azurewebsites.net/api/FileManager/GetImage">
</FileManagerAjaxSettings>
<FileManagerUploadSettings DropArea="null"></FileManagerUploadSettings>
</SfFileManager>