Telerik Forums
Kendo UI for jQuery Forum
1 answer
230 views

Hi,

Is there a way we can add custom images(blob) to Kendo Upload list using jQuery (Before upload to the server)?

 

Martin
Telerik team
 answered on 05 Aug 2021
1 answer
325 views

Hi All,

I want to add custom button to Kendo Upload, which we can add images to list from clipboard.

 

Thanks,

Supun

Martin
Telerik team
 answered on 04 Aug 2021
3 answers
1.6K+ views

I am using Telerik Kendo File Upload for uploading folder. In Production environment, few users are complaining issue with Folder Upload, during upload few files get errored out, using Developer tool in the console tab it logs "ERR_HTTP2_PROTOCOL_ERROR" error as attached for the failed files.

When i am trying i am not getting this error and all folders are getting uploaded properly. I asked user to share the files for which they are facing error and when i tried it uploaded successfully. When user tried again uploading same files which errored out it got succeeded today which were failing yesterday but sill there are files which is giving the same error.

I went through a post where it say the problem could be due to use of HTTP/2 and when they switched to HTTP /1.1 it worked fine. We are also using HTTP/2 but we don't have option of going back to HTTP/1.1. Link below :

 

https://www.telerik.com/forums/problems-with-multi-file-upload-and-http-2

 

Any suggestions ?

 

Neli
Telerik team
 answered on 21 Jun 2021
2 answers
773 views

I added a custom template for the Upload Widget. The file size (#=size#) prints to a byte value. How can I format the file size (#=size#) to print in KB instead of Bytes - and with two decimals? (like the upload widgets default)

I added the template as a function, as mentioned here.

Thanks for any advice!

Patrick

Patrick
Top achievements
Rank 1
Iron
 answered on 03 Jun 2021
1 answer
671 views
How can I limit the number of files to upload with the Kendo UI Upload widget?  
Martin
Telerik team
 answered on 27 May 2021
1 answer
379 views

When using the filemanager's upload button to upload the files, everything works correctly. The files uploaded show on the list and I can see when the file upload is complete.

But if I drag and drop the files into a folder, the files are also uploaded, but I don't see the list of files, if these are large files, I can not tell when the transfer is complete.

How can I make the  filemanager display the show the list of files uploaded when a drag and drop happens?

 

Neli
Telerik team
 answered on 27 May 2021
1 answer
1.2K+ views

Hello, I have some problem when use Kendo Upload + Kendo Wizard.

Specifically I'm doing a Kendo Wizard with an .html file.

In the .html file of step 1, I used Kendo Upload to Upload Image.

Then It will show up in the .html file of step 2. But now I can only show in step 1 and I don't know how to show it in step 2

Please help me, thanks!!!

My Kendo Wizard Code:

$("#wizard").kendoWizard({
        loadOnDemand: true,
        reloadOnSelect: false,
        steps: [
            {
                title: "Upload",
                icon: "upload",
                successIcon: "check",
                buttons: ["next"],
                contentUrl: "./step1.html"
            }, {
                title: "Settings",
                icon: "gear",
                successIcon: "check",
                contentUrl: "./step2.html"
            }, {
                title: "Check All",
                icon: "preview",
                successIcon: "check",
                buttons: ["previous", "next"],
                contentUrl: "../content/web/wizard/ajax/ajaxContent4.html"
            }, {
                title: "Save",
                icon: "save",
                successIcon: "check",
                buttons: ["previous", "done"],
                contentUrl: "../content/web/wizard/ajax/ajaxContent4.html"
            },
        ],
        done: function (e) {
            e.preventDefault();
            var form = $("form").getKendoForm();
            var zxy = $("#title").val();

            console.log(zxy);

            if (e.sender.stepper.steps()[1].options.error) {
                e.sender.stepper.steps()[1].setValid(true);
                e.sender.stepper.steps()[2].setValid(true);
            }

            kendo.alert("Thank you for registering!");

        },

        reset: function () {
            var form = $("form").getKendoForm();

            if (form) {
                form.clear();
            }
        }
    });



My step1 is Kendo Upload

<inputname="files"id="files"type="file"/>

$("#files").kendoUpload({
        async: {
            chunkSize: 11000,// bytes
            saveUrl: "https://demos.telerik.com/kendo-ui/upload/chunksave",
            removeUrl: "https://demos.telerik.com/kendo-ui/upload/remove",
            autoUpload: true
        },
        validation: {
            allowedExtensions: [".jpg", ".jpeg", ".png", ".bmp", ".gif"]
        },
        success: onSuccess,
        showFileList: true,
    });
    function onSuccess(e) {
        if (e.operation == "upload") {
            for (var i = 0; i < e.files.length; i++) {
                var file = e.files[i].rawFile;
                if (file) {
                    var reader = new FileReader();
                    reader.onloadend = function () {
                        $("<div class='product'><img src=" + this.result + " /></div>").appendTo($("#products"));
                    };
                    reader.readAsDataURL(file);
                }
            }
        }
    }


My step 2 is form, I want to show the image uploaded in step 1 above the form. And I'm having trouble here

<form>

<div class="wrapper">

 
<div id="products"></div>
</div>

<input type="text" id="title" name="title" class="k-textbox" />
</form>

Demo:

Step 1: Upload (Image step1.png)

Step2: Input Information (Image step2.png)

Aleksandar
Telerik team
 answered on 05 May 2021
1 answer
87 views

How to use kendo upload file to send xlsx to api?

service is using closedxml to store data to datatable.

Martin
Telerik team
 answered on 07 Apr 2021
5 answers
2.4K+ views

I saved file in server with unique name. so i change the file name while uploading. My issue is, when I upload file, I need to update the k-files to show only changed name. but now, it is displaying original file name.

$("#MediaFiles").kendoUpload({ async: { removeUrl: "/Pepsico/Remove", saveUrl: "/Pepsico/Save", autoUpload: true }, files: $scope.pepsicoNomination.MediaFiles, validation: { allowedExtensions: [".pdf"] }, upload: fileUplaodValidation, success: onMediaSucess, error: onError }); function onMediaSucess(e) { if (e.response.media == "") { $scope.$apply(function () { $rootScope.showFailureMsg("There is an issue while uploading your file. Please contact customer support"); }); var fileStatus = document.getElementsByClassName('k-upload-status-total') $(fileStatus).hide(); } else { $scope.pepsicoNomination.MediaFiles.push({ name: e.response.media }); } }

 

Here files in kendo upload not update after success.

Is there any way to update files?

 

Thanks

Neli
Telerik team
 answered on 22 Mar 2021
2 answers
232 views

Is the code below still the only way to set the required AngularJS XSRF token when uploading or removing files? The value of the token needs to be taken from the XSRF-TOKEN cookie.

 

function onUpload(e) {

var xhr = e.XMLHttpRequest;

if (xhr) { xhr.addEventListener("readystatechange", function (e)

    {if (xhr.readyState == 1 /* OPENED */) {

         xhr.setRequestHeader("X-Foo", "Bar");

    }})}}

 

Petar
Telerik team
 answered on 19 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?