Is it possible to submit Uploader upload with script?

1 Answer 200 Views
Upload
nodsec
Top achievements
Rank 1
Iron
Iron
nodsec asked on 12 Aug 2022, 07:38 PM

I'm using KendoUploader with autoUpload=false. When the autoUpload is set to false, on bottom side of uploader is displayed button to upload files manually. I would like to ask, if is possible to hide bottom buttons and somehow call some method/attribute of Upload component to start upload with the script. Is it possible? 

(I would like to start upload after success submit of Kendo Form).

<Upload
                                  autoUpload={false}
                                  batch={false}
                                  multiple={true}
                                  defaultFiles={[]}
                                  withCredentials={false}
                                  saveUrl={"https://demos.telerik.com/kendo-ui/service-v4/upload/save"}
                                  removeUrl={"https://demos.telerik.com/kendo-ui/service-v4/upload/remove"}
                              />

Thanks a lot for each help :-)

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 16 Aug 2022, 02:44 PM

Hi Nodsec,

You can use the `triggerUpload` method (added in v5.1.0)  of the Upload component in order to force the upload from external button in a similar way:

 

Another possible approach is available in the following KB article:

Tags
Upload
Asked by
nodsec
Top achievements
Rank 1
Iron
Iron
Answers by
Vessy
Telerik team
Share this question
or