javascripthtmlkendo-uikendo-templatekendo-upload

Why are there two similar action buttons in Kendo UI Upload template?


From the Kendo UI API reference: "To render an action button for each file, add the following markup to the template: <button type='button' class='k-upload-action'></button><button type='button' class='k-upload-action'></button>"

https://docs.telerik.com/kendo-ui/api/javascript/ui/upload/configuration/template

Can someone explain, why there are two similar buttons in the markup?


Solution

  • From looking at the source code (which requires a license from Telerik), those buttons take different functions depending on the scenario:

    1. retry
    2. remove
    3. pause
    4. cancel

    Pause and cancel can be available at the same time (if async.chunkSize is set), or retry and remove can both be visible in case of an error.