Hi Team,
Thank you in advance in helping me with this issue.
In my project we are using the Kendo Upload control and its working as expected except one issue.
Issue:
If I drag a file and drop the same only single file is getting uploaded as (multiple set to false) but for the same single file api receiving two calls with same file name, which is causing duplicate entries in data base.
Note: This issue is happening only when I delete the uploaded file and refresh the form and then drag a file and drop it, also in the html we have two kendo-uploaddropzone controls along with kendo-upload, one for intial case where data is not available and other when data is available.
<div *ngIf="currentAttachment && !currentAttachment.isDeleted" class="file-info-container">
<kendo-uploaddropzone zoneId="singleUploadZone">
<div class="text-container">
<p>{{displayText1}}</p>
<p>
{{displayText2}}
<a class="open-file-dialog-link" [class.disabled]="to.disabled" (click)="!to.disabled && startUploadFile(uploader)">{{displayText3}}</a>
{{displayText4}}
</p>
</div>
<kendo-upload #uploader
[multiple]="false"
[restrictions]="restrictions"
[saveUrl]="uploadUrl"
[autoUpload]="true"
(success)="onSuccess($event)"
(error)="onError($event)"
(select)="uploadInfoSelect($event)"
[disabled]="to.disabled"
zoneId ="singleUploadZone"
kendoFileUpload>
<kendo-upload-messages select="" [dropFilesHere]="displayText">
</kendo-upload-messages>
</kendo-upload>
</kendo-uploaddropzone>
/>
<div *ngIf="currentAttachment && !currentAttachment.isDeleted" class="file-info-container">
<kendo-uploaddropzone zoneId="singleUploadZoneWithData">
<div class="row">
<div class="col-12">
<div class="text-container">
<p>{{displayText1}}</p>
<p>
{{displayText2}}
<a class="open-file-dialog-link" [class.disabled]="to.disabled" (click)="!to.disabled && startUploadFile(uploader)">{{displayText3}}</a>
{{displayText4}}
</p>
</div>
<kendo-upload #uploader
[multiple]="to.multiple"
[restrictions]="restrictions"
[showFileList]="false"
[saveUrl]="uploadUrl"
[autoUpload]="true"
(success)="onSuccess($event)"
(error)="onError($event)"
[disabled]="to.disabled"
zoneId ="singleUploadZoneWithData"
kendoFileUpload>
</kendo-upload>
</div>
</div>
</kendo-uploaddropzone>
.ts
this function is called twice even though only one file is selected.
public uploadInfoSelect(data) {
console.log(data);
}
/>