This is a migrated thread and some comments may be shown as answers.

Problem with multiple=false in Upload control

3 Answers 393 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Ever
Top achievements
Rank 1
Ever asked on 16 Jan 2015, 05:06 PM
Hello, I am using Upload Control (Kendo UI), in the view code I specify k-multiple="false" in the upload control.

Example:
<input type="file" name="file_{{doc.Name}}"
                                   kendo-upload k-async="{ saveUrl: '@ViewBag.UploadUrl', removeUrl: '@ViewBag.RemoveUrl', autoUpload: true }"
                                   k-select="onFileSelect"
                                   k-multiple="false"
                                   k-upload="onFileUpload"
                                   k-success="onSuccess" />


My situation is:
- When the file selected is uploaded and the control is 100% (green color), after this, the upload control allows to select another additional file and upload it, but I need that upload control doesn't allow select and upload multiple files.

Could you please help me?



3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 19 Jan 2015, 07:39 AM

Hello Ever,

I covered this question on the support thread on the same topic. Could you please check my answer and let me know if this was the reason for the problem?

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Stephane
Top achievements
Rank 1
answered on 06 Dec 2017, 02:51 PM
A link to that thread would be nice...
0
Veselin Tsvetanov
Telerik team
answered on 08 Dec 2017, 12:55 PM
Hi Stephane,

The multiple configuration of the Kendo Upload allows the developer to configure whether the widget will accept multiple files to be selected at once or not. It will not limit the total number of uploaded files.

If you need to limit the user to upload only one file, I would suggest you to use the widget enable() method in the success event handler in the following way:
$scope.onSuccess = function(e) {
  e.sender.enable(false);
}

Here you could find a simple Dojo, implementing the above suggestion.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Upload
Asked by
Ever
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Stephane
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or