Telerik Forums
Kendo UI for Angular Forum
1 answer
24 views
I'm using Upload for Angular in my app. I need to style the Clear and Upload buttons to match the rest of my app. I've tried many things but nothing is working. I'm looking to override all of the class attributes of these buttons and assign 'btn btn-bare' to Clear and 'btn btn-primary' to Upload.
Hetali
Telerik team
 answered on 30 Jan 2024
1 answer
26 views
 <kendo-uploaddropzone-messages
dropFilesHere ="Max file size: 47.68 MB Only .xlsx">
 </kendo-uploaddropzone-messages>

this tag helps to customize the message hints, but it's coming as a string

we need to show the hint like this. How do we do?

Hetali
Telerik team
 answered on 03 Nov 2023
0 answers
29 views
We have wondered here that large files no longer arrive completely. Ok, chunkable must be configured. The header "metadata" is now set for the request, but we miss the header "Content-Range".
Have now found nothing to the header "metadata" that this would be a new standard, should not the kendo-uploader also set "Content-Range"?
Sandy
Top achievements
Rank 1
 asked on 11 Oct 2023
2 answers
114 views

Hi , I am using the uploader but I want to limit the number of files that the user can select , the uploader is set to manual uploading and user can select multiple files , so if the user select 7 files and the MaxFileLimit is set to 5,  I want to add 5 files to the list and removed the rest  . 


 <kendo-upload 
                    [saveUrl]="uploadUrl" 
                    [autoUpload]="false" 
                    [actionsLayout]="actionsLayout"
                    [restrictions]="imageRestrictions" 
                    (select)="select($event)"
                    (remove)="remove($event)" 
                    (clear)="clear()"
                    (upload)="uploadEventHandler($event)"
                    (complete)="complete()">
                        <ng-template kendoUploadFileInfoTemplate let-file>
                            <div><img [src]="findPreview(file)" style="height: 50px;"> Name: {{file[0].name}} </div>
                            <div *ngIf="file[0].validationErrors">You cannot upload this file :: {{file[0].validationErrors[0]}}</div>
                          </ng-template>
                    </kendo-upload>

I have tried using the Select Event to remove the file using  e.preventDefault(); but it does stop the process and not files are added to the list if the users select more than 5 files .


 

publicselect(e: SelectEvent): void { const that = this; e.files.forEach((file) => { if (file.extension === '.jpg') { if (this.imageCount < this.maxImageCount) { this.imageCount++ if (!file.validationErrors) { const reader = newFileReader(); reader.onload = function (ev) { const image = { src: ev.target["result"], uid: file.uid, }; that.imagePreviews.unshift(image); }; reader.readAsDataURL(file.rawFile); } }else { e.preventDefault(); } } }); }

Any ideas on how to remove the extra files or limit the number of files the user can select .

Thanks

 

 

 

 

 

 

 

Hernando
Top achievements
Rank 1
Iron
 answered on 20 Jun 2023
1 answer
49 views

Hello,

I'm using kendo-upload for uploading files and displaying progress by subscribing to the uploadProgress event. 

When [chunkable]="false" it seems that the event is fired every second or less, allowing the developer to show the progress smoothly.

The above is not true when [chunkable] is set to some value, the event is fired only when every next chunk is uploaded. Consider the following settings: [chunkable] = "{ size: 1048576} and file size to upload is 10Mb, in this case, only 10 events are going to be fired with  event.percentComplete = 10, 20, 30 .... 100. This prevents me from building a progress indicator that works smoothly enough. Any ideas about getting uploadProgress fired during the chunk upload more often than once at the end?

Slavena
Telerik team
 answered on 12 Jun 2023
2 answers
77 views

I am utilising the Kendo Uploader which is hitting a .net Frameworks api. The endpoint saves the file and then using the Telerik Doc library will open the uploaded spreadsheet and a validation begins where each row is validated against a set of rules. If any row fails to validate then details of the failure are recorded as a list. Once all rows have been checked the error list is returned as a json response. If the sheet validates without error the code will then save each row as a new record and return a json result confirming the number of records saved or if saving fails then an error as a json result.

I need to be able to process the json response on the client side via the onSuccess or onError events or some other way. Is this possible

Many Thanks

Martin
Telerik team
 answered on 23 May 2023
1 answer
37 views

using kendoFileSelectFileTemplate,

would like to have some Angular TypeScript code run when the user clicks in the whitespace in the <li> elements rendered by the kendo-upload control.

Martin
Telerik team
 answered on 26 Apr 2023
1 answer
41 views

Hi.

I am having issue with upload component when uploading a single file. I am using @progress/kendo-angular-upload version 9.0.3. Angluar version 14.

When I select a file, upload it and get non-successful HTTP status code back from back-end (e.g. CSV file header validation didn't pass), then I get retry and remove buttons. When I click retry button, it retries to upload same file with POST request with all correct HTTP headers.

However, if I modify the file externally (e.g. by fixing CSV file header), save it and then try clicking retry button, upload component issues incorrect HTTP request to the back-end, various HTTP request headers are missing (e.g. it no longer specifies that it is a POST request). After inspecting 'good' failing POST request with 'bad' request, other than obviously missing HTTP headers I can see that the actual file which is being uploaded has incorrect modified date and size. Looks like that when I click retry button after modifying the file externally, upload component no longer works correctly.

Is this intended behavior due to browser nuances and how it works with files, or is this a bug? Or maybe I am doing something wrong...

Martin
Telerik team
 answered on 09 Feb 2023
1 answer
58 views

Hi,

I am currently trying to upgrade Kendo UI for Angular components to their latest versions (v11.0.0).

For customization, I am using the Theme Builder (https://themebuilderapp.telerik.com). When I export the configured theme, I get some zipped files, one of which is an "index.scss", in which the first line states:

// Compatible with @progress/kendo-theme-default v.5.8.0

 

But the latest package of "@progress/kendo-theme-default" is version 6.0.3, and the styles generated by the Theme Builder seem not to be compatible with Kendo components v11.

I tried downgrading this package to 5.12.0, but then the file upload component looks broken:

Is this a known issue?

When will the Theme Builder be compatible with the latest Kendo packages?

Thanks in advance,

Felix

 

Martin
Telerik team
 answered on 23 Jan 2023
1 answer
49 views

Is it possible to customize [saveUrl] per selected file in kendo-upload component?

I would like to POST a file to the https://my.api.com/files in one scenario and PUT a file to the https://my.api.com/files/fileId in another one.

Yuriy Rogach
Top achievements
Rank 1
Iron
 answered on 13 Oct 2022
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?