File Upload

0 Answers 11 Views
Upload
avto
Top achievements
Rank 1
avto asked on 01 Apr 2024, 12:11 PM
It is possible  On here 
 <kendo-upload
          #upload
          [saveField]="'file'"
          [saveUrl]="uploadSaveUrl"
          [removeUrl]="uploadRemoveUrl"
          [autoUpload]="false"
          [withCredentials]="false"
          (remove)="removeImg($event)"
          (upload)="onFileUpload($event)"
          (success)="onUploadSuccess($event)"
          (complete)="complete()"
          (cancel)="cancel($event)"
          (error)="error($event)"
          (focus)="focus()"
        (pause)="pause($event)"
        (uploadProgress)="uploadProgress($event)"
        (resume)="resume($event)"
          [chunkable]="chunkSettings">
        </kendo-upload>
when i remove
[removeUrl]="uploadRemoveUrl"
remove icon didnot  removed in browser?
avto
Top achievements
Rank 1
commented on 01 Apr 2024, 12:12 PM

or
[removeUrl]="uploadRemoveUrl"
here to make request whit delete method whit body ?
Georgi
Telerik team
commented on 04 Apr 2024, 07:27 AM

Hi Avto,

Thank you very much for the code snippet provided.

Based on the information provided in the thread, I am not entirely sure what is the exact desired behavior for the Kendo UI for Angular Upload component. For this reason, I will try to provide some general guidelines that might prove to be useful in this particular case. 

Generally speaking, removing the removeUrl property from the Upload configuration means that the built-in remove icon (X) will not be rendered:

The default behavior of the removeUrl implies that is used for setting the endpoint to the remove request:

https://www.telerik.com/kendo-angular-ui/components/uploads/api/UploadComponent/#toc-removeurl

In case the requirement for the implementation is that the removeUrl property remains unset, the developer could manually implement a custom Clear/Remove button that removes the desired file from the component. To do this, I would suggest utilizing the FileTemplateDirective and the removeFilesByUid() method.

To better illustrate the suggested approach, I am sending you a StackBlitz demo that implements it:

https://stackblitz.com/edit/angular-qshqjj

In case none of the provided information helps you achieve the desired behavior for the Upload component, I would ask you to provide more detailed information about the expected end result. This would allow me to gain a better understanding of the exact scenario and thus come up with a more suitable suggestion.

Let me know if this helps.

Regards,
Georgi
Progress Telerik

 

avto
Top achievements
Rank 1
commented on 08 Apr 2024, 11:06 AM

Thenks

No answers yet. Maybe you can help?

Tags
Upload
Asked by
avto
Top achievements
Rank 1
Share this question
or