How to add additional data on upload in ASP.NET Core File Upload

26 Aug 20261 minute to read

The Uploader control allows you to add additional data when uploading files. Using the uploading event and its customFormData argument, you can send this data to the server. Refer to the following example.

@{
    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" };
}

<div class="control_wrapper">
    <div id='preview'></div>
    <ejs-uploader id="fileupload" uploading="onFileUpload" asyncSettings="@asyncSettings"> </ejs-uploader>
</div>
<script>

    function onFileUpload(args) {
        debugger
        args.customFormData = [{ 'name': 'Syncfusion INC' }];
    }

</script>
.control_wrapper {
	max-width: 505px;
	margin: auto;
}

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.