How to hide the default drop area in ASP.NET Core File Upload

24 Aug 20261 minute to read

You can achieve this behavior by overriding the corresponding Uploader styles to hide the default drop area.

  • .e-upload.e-control
  • .e-upload .e-file-select
  • .e-upload .e-file-drop
@{
    var asyncSettings = new Syncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = "https://services.syncfusion.com/aspnet/production/api/FileUploader/Save", RemoveUrl = "https://services.syncfusion.com/aspnet/production/api/FileUploader/Remove" };
}
<ejs-uploader id="UploadFiles" asyncSettings="@asyncSettings"> </ejs-uploader>
#droparea {
    padding: 50px 25px;
    margin: 30px auto;
    border: 1px solid #c3c3c3;
    text-align: center;
    width: 20%;
    display: inline-flex;
    }
    .e-file-select,
    .e-file-drop {
    display: none;
    }
    body .e-upload-drag-hover {
    outline: 2px dashed brown;
    }
    #uploadfile {  
    width: 60%;
    display: inline-flex;
    margin-left: 5%;
    }
	.e-control .e-file-select,
	.e-control .e-file-drop {
	  display: none;
	}

Explore the ASP.NET Core File Upload feature tour page to discover its groundbreaking features. You can also check out our ASP.NET Core File Upload example to see how to browse and select files for upload to the server.