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

Customize File Type Icons

2 Answers 310 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Ashleigh L
Top achievements
Rank 1
Ashleigh L asked on 12 Nov 2015, 06:30 PM

Related to my other thread (http://www.telerik.com/forums/restrict-allowed-file-types), we're going to be restricting the allowable file types, but we also allow some semi-odd ones, such as .ai, .psd, .indd, .idml. We've already got icons of our own to represent these file types, so I'm hoping we can customize the uploader to display them.

I have this code snippet from one of the upload examples:

function addExtensionClass(extension) {        
    switch (extension) {
        case '.jpg':
        case '.img':
        case '.png':
        case '.gif':
            return "img-file";
        case '.doc':
        case '.docx':
            return "doc-file";
        case '.xls':
        case '.xlsx':
            return "xls-file";
        case '.pdf':
            return "pdf-file";
        case '.zip':
        case '.rar':
            return "zip-file";
        default:
            return "default-file";
    }
}

 Two things: where do these icons come from, and how can I check which ones are available? Secondly, can I replace these with my own icons (we use FontAwesome), which are set up like this:

<i class="fa-icon-check"></i>

2 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 13 Nov 2015, 08:29 AM

Hello shimmoril,

These icons are only part of the example, not built in Kendo UI. You could use any custom icons in the files templates.

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
Ashleigh L
Top achievements
Rank 1
answered on 16 Nov 2015, 03:49 PM
Thanks.
Tags
Upload
Asked by
Ashleigh L
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Ashleigh L
Top achievements
Rank 1
Share this question
or