Uploading Files by Using External Button
Environment
Product | Progress® Kendo UI Upload |
Description
How can I upload files in the Kendo UI for Angular Upload by using an external button?
Solution
By default, when the autoUpload
option is set to false
, the Upload component renders the Clear and Upload buttons under the selected files.
To hide the default buttons, apply custom CSS.
-
Set the Angular
ViewEncapsulation
toNone
. Otherwise, the custom styles will not be applied unless they are provided on a global level..k-actions { display: none }
-
Create custom buttons to upload and clear the selected files by utilizing the
uploadFiles
andclearFiles
methods in theclick
handler function.
The following example demonstrates the full implementation of the suggested approach.