How to add progress bar with percentage for kendo-upload control in angular without using interceptor

1 Answer 866 Views
FileSelect General Discussions ProgressBar Upload
Aswini
Top achievements
Rank 1
Aswini asked on 22 Feb 2022, 02:04 PM

I m using kendo-upload file control as below.

<kendo-upload formcontrolname="cfile" [saveurl] = "fileurl" [upload] ="uploadhandler" >

I could not use interceptor as my existing saveurl request is done by http not through httpclient.Also how i can calculate the file upload percentage

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 23 Feb 2022, 03:20 PM

Hi,

The interceptor is used in our demos only for the purposes of the examples i.e. since no actual upload requests are being made, it simulates one with sample percentages. In a real world scenario, the percentage will be calculated and displayed automatically based on the progress of the upload request. Thus, there won't be a need for manual calculations.

Regards,
Dimiter Madjarov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Aswini
Top achievements
Rank 1
commented on 23 Feb 2022, 05:41 PM

Hi,

In jquery and other libraries, this uploaded percentage is calculated through submit event as it trigers an httpevent and throught that we can get event.loaded and event.total value. But here as we have only uploadevent and successevent during file upload, how to get the information on file upload percentage  Could you please help with an example to do this 

Martin
Telerik team
commented on 28 Feb 2022, 10:18 AM

Hi Aswini,

The developer can handle the built-in uploadProgress event which is emitted when the files are in the process of uploading. The event returns arguments of type UploadProgressEvent which includes percentComplete property indicating the portion that has been uploaded.

Regards.

Tags
FileSelect General Discussions ProgressBar Upload
Asked by
Aswini
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or