Unplanned
Last Updated: 29 Apr 2024 09:51 by Steven
Created by: Steven
Comments: 0
Category: Upload
Type: Feature Request
1
I want to have the ability to prevent my users from dragging and dropping files in the Upload component via built-in API. A parameter like EnableDragDrop would be a good way to achieve the desired behavior. 
Unplanned
Last Updated: 22 Apr 2024 10:21 by Quentin
Created by: Quentin
Comments: 0
Category: Upload
Type: Feature Request
3

When the Upload has Initial Files, the RemoveUrl endpoint is not called when the user removes them from the UI. 

===

TELERIK EDIT

The current workaround is to call the RemoveUrl in the Upload's OnRemove event handler. This is also applicable when you need to send additional custom data with the file name.

.razor file

@inject HttpClient HttpClient

<TelerikUpload OnRemove="@OnUploadRemove" RemoveUrl="@RemoveUrl" />

@code {
    private string RemoveUrl { get; set; } = "api/upload/remove";

    private async Task OnUploadRemove(UploadEventArgs args)
    {
        // code for non-initial files
        // send optional custom data to the controller
        args.RequestData.Add("requestKey", "custom value");

        // code for initial files
        // call the RemoveUrl
        if (args.Files.First().Status == UploadFileStatus.Blank)
        {
            var multipartContent = new MultipartFormDataContent();

            multipartContent.Add(new StringContent(args.Files.First().Name), "files"); // "files" must match the RemoveField value
            multipartContent.Add(new StringContent("requestKey"), "custom value"); // send optional custom data to the controller

            await HttpClient.PostAsync(RemoveUrl, multipartContent);
        }
    }
}

 

Program.cs

builder.Services.AddHttpClient();

 

Unplanned
Last Updated: 13 Dec 2023 21:41 by Greg
Created by: Timothy J
Comments: 1
Category: Upload
Type: Feature Request
5

I am trying to upload files to an URL that is not in my control and it requires the PUT HTTP method. The Telerik Blazor Upload always uses a POST.

I imagine API like this would be nice:

 

        <TelerikUpload SaveUrl="@SaveUrl" SaveMethod="PUT">

        </TelerikUpload>

 

---

ADMIN EDIT

In the meantime, there are two possible solutions:

  • Upload the file to your own server that can accept POST and use that server to upload to the third party. This can help hide URLs and security from your end users as well.
  • Implement a FileSelect type of component to get the file in code and upload it with your own HTTP request from C#.

---

Unplanned
Last Updated: 09 Mar 2023 10:41 by ADMIN
Created by: Mike
Comments: 0
Category: Upload
Type: Feature Request
1
This request is for the Upload component to allow using a named HttpClient for connecting to the Web API.  This would alleviate the need to enter authentication headers in the OnUpload event if the named HttpClient has already been configured for all of that at startup.  I see 2 potential options for this.  Either provide a string parameter that contains the name of the HttpClient that was set up at startup. This way when you instantiate an HttpClient, you can use a factory to create it by name.  Or provide an IHttpClient parameter where the user can directly pass in the client to the component.
Unplanned
Last Updated: 19 Jan 2023 08:03 by ADMIN
Created by: Bob
Comments: 3
Category: Upload
Type: Feature Request
12
Unplanned
Last Updated: 30 Nov 2022 13:44 by Dominik
Created by: Jay
Comments: 16
Category: Upload
Type: Feature Request
68
The goal is to be able to upload large files (above the server limit which is usually 20-30MB).
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: 27 Apr 2021 17:32 by ADMIN
Created by: Matthew
Comments: 0
Category: Upload
Type: Feature Request
17
In the Blazor upload control, is there a way to upload directories (folders)?

 

In MVC, its just

.Directory(true)

.DirectoryDrop(true)
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

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 span.k-delete");
        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");
    }
}

---

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.