Hi Roman,
Greetings from Syncfusion support.
We have checked your query. We would like to know you that change event will be triggered only if you bind the asyncSettings property which allows you to configure endpoints for saving or removing the file to the server. So we suggest you to use asyncsettings property to resolve your issue. Kindly refer the below code snippet. We have modified the attached sample. Please find the attached sample below.
public asyncSettings =
{saveUrl: 'https://ej2.syncfusion.com/services/api/uploadbox/Save',
removeUrl: 'https://ej2.syncfusion.com/services/api/uploadbox/Remove' }
<UploaderComponent
id="chunkUpload"
ref={(scope) => {
this.uploadObj = scope;
}}
asyncSettings = {this.asyncSettings}
created = {this.onCreated}
change={this.onChange}
></UploaderComponent>
|
You can also get files by using native change event by binding the change event of native input in the Created event of Uploader as like below.
onCreated = (args: any) => {
this.uploadObj.element.addEventListener('change',function(e){
console.log("Native Change event triggered");
})
};
|
Also, you can restrict the other files and upload only the specific extensions(.xlsx) by configuring the allowedExtensions property.
Jeyanth.