Completed
Last Updated: 22 Feb 2022 08:33 by ADMIN
Created by: Alan
Comments: 3
Category: Upload
Type: Feature Request
19

I would like to have my users click my own button or element to trigger the file select dialog that you get from clicking the "Select Files..." button on the Upload component.

A workaround is to use a function like this

window.customUploadClick = function () {
    $('.k-upload-button input').trigger('click');
}

---

ADMIN EDIT

 

Completed with 3.0.0 release

 

If you are not using jQuery already, you don't have to add it for this, standard browser API can do this too:

 

@inject IJSRuntime _js

<script suppress-error="BL9992">
    window.customUploadClick = function () {
        document.querySelector(".k-upload-button input").click();
    }
</script>

<TelerikButton OnClick="@InvokeSelectClick">invoke click</TelerikButton>

<TelerikUpload></TelerikUpload>

@code{
    async Task InvokeSelectClick()
    {
        await _js.InvokeVoidAsync("customUploadClick");
    }
}

 

---

Completed
Last Updated: 12 Jan 2022 15:10 by ADMIN
Release 3.0.0
Created by: Alan
Comments: 1
Category: Upload
Type: Feature Request
30
If I set AutoUpload=false, I have a button that starts the upload process. I would like to be able to do that with my own button.
Completed
Last Updated: 09 Dec 2021 18:06 by Samuel
Release 2.28.0
If a request fails once, the upload will give you a Retry button. This button does not fire OnUpload again, so the request no longer has the custom logic (such as bearer tokens).
Unplanned
Last Updated: 09 Nov 2021 10:17 by ADMIN
I would like to upload multiple files with the same POST request
Unplanned
Last Updated: 29 Sep 2021 08:40 by ADMIN
Created by: Mitch
Comments: 0
Category: Upload
Type: Feature Request
0
Please consider a timeout setting for the Upload requests, similar to the XmlHttpRequest timeout.
Unplanned
Last Updated: 01 Feb 2021 08:37 by ADMIN

Is it possible to programmatically perform actions on the uploader, such as to remove files, rather than having to click on the remove button on each uploaded file?

---

ADMIN EDIT

The request also applies to the FileSelect component.

Might be related to the ability to have initial files shown in the list: https://feedback.telerik.com/blazor/1485660-initial-files-in-blazor-upload.

At the moment, you could try using JS Interop to loop over the list, determine which file you want to remove and .click() its remove button. Here is a basic example of getting the buttons to click the second one. You could traverse the DOM to get the file name, or you could keep a collection of the files to use indexes in a fashion similar to this example.

 

@inject IJSRuntime _js

@* move this script to a correct location it's here as ahack to make the snippet shorter and easy to copy  *@
<script suppress-error="BL9992">
    function removeSecondFile(){
        var deleteButtons = document.querySelectorAll("li.k-file button");
        if(deleteButtons && deleteButtons.length > 1){
            deleteButtons[1].click();
        }
    }
</script>

<TelerikUpload AutoUpload="false" SaveUrl="my-endpoint"></TelerikUpload>
<TelerikButton OnClick="@RemoveSecondFile">Remove second file</TelerikButton>

@code{
    async Task RemoveSecondFile()
    {
        await _js.InvokeVoidAsync("removeSecondFile");
    }
}

 

---

Duplicated
Last Updated: 09 Nov 2020 12:44 by ADMIN
Created by: Tyler
Comments: 1
Category: Upload
Type: Feature Request
1

Right now we are hiding it based on styling. 

    .k-file-success{
    
    display:none !important;
    }
    
    
Would be nice to have a property to hide it.

We do this to provide a customized display of files uploaded.
Unplanned
Last Updated: 21 May 2020 16:58 by ADMIN
Created by: Ryan
Comments: 0
Category: Upload
Type: Feature Request
4
I want a single button that will call the RemoveUrl for all uploaded files. At the moment, there is a separate button for each file only.
Unplanned
Last Updated: 23 Apr 2020 08:03 by ADMIN
The file info passed in UploadSuccessEventArgs to the event contains HTML entities

e.g. for the file "Golf & Country Club.png" the file info name is "Golf &amp; Country Club"  which leads to an exception.
Completed
Last Updated: 23 Mar 2020 15:06 by Christian
Created by: Christian
Comments: 2
Category: Upload
Type: Bug Report
1

In version 2.9.0 of the library there are two small spelling issues:

Scheduler_Recurrence_Editor_Frequencies_Monthly: Montly //Montly is written without "h"
Upload_InvalidMinFileSize: File size too small //Missing dot after the message (E.g. Upload_InvalidMaxFileSize has an ending dot).

 

Best regards,

Christian

1 2