Unplanned
Last Updated: 29 Sep 2016 18:37 by John
Unplanned
Last Updated: 07 Apr 2020 13:26 by ADMIN
Created by: Charles
Comments: 0
Category: CloudUpload
Type: Feature Request
4
Unplanned
Last Updated: 09 Jan 2020 09:05 by ADMIN

Add a functionality, which allows developers to pass query string parameters from client to the custom handler. Similar to RadAsyncUpload.

Workaround:

<telerik:RadCloudUpload ID="RadCloudUpload1" runat="server" ProviderType="Azure"
            MultipleFileSelection="Automatic" OnClientFileSelected="onClientFileSelected"
            HttpHandlerUrl="~/Handlers/UploadToMultipleFoldersHandler.ashx">
</telerik:RadCloudUpload>

<script>
    function onClientFileSelected(sender, args) {
        var customParam = "test";
        sender._module._handlerUrl = "/Handlers/UploadToMultipleFoldersHandler.ashx?type=rcu&customParam=" + customParam;
    }
</script>

<%@ WebHandler Language="C#" Class="UploadToMultipleFoldersHandler" %>
  
using System;
using System.Web;
  
public class UploadToMultipleFoldersHandler : Telerik.Web.UI.CloudUploadHandler {
  
    public override void SetKeyName(object sender, Telerik.Web.UI.CloudUpload.SetKeyNameEventArgs e)
    {
        var param = HttpContext.Current.Request["customParam"];
               
        var carsFolder = HttpContext.Current.User.Identity.Name + "/";
        e.KeyName = string.Format("{0}{1}_{2}", carsFolder, Guid.NewGuid(), e.OriginalFileName);
    }  
}

Unplanned
Last Updated: 20 Apr 2020 07:57 by ADMIN
Created by: Andy
Comments: 0
Category: CloudUpload
Type: Feature Request
2

Add the ability to upload whole folders to the RadCloudUpload, similar to the FR for AsyncUpload: