File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/BootstrapBlazor/Components/Upload Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -262,5 +262,18 @@ private async Task OnClickCancel(UploadFile item)
262262 return builder . Build ( ) ;
263263 }
264264
265- private string ? GetFileExtensions ( string fileExtension ) => FileIconFile ;
265+ private string ? GetFileExtensions ( string fileExtension ) => fileExtension switch
266+ {
267+ ".csv" or ".xls" or ".xlsx" => FileIconExcel ,
268+ ".doc" or ".docx" or ".dot" or ".dotx" => FileIconDocx ,
269+ ".ppt" or ".pptx" => FileIconPPT ,
270+ ".wav" or ".mp3" => FileIconAudio ,
271+ ".mp4" or ".mov" or ".mkv" => FileIconVideo ,
272+ ".cs" or ".html" or ".vb" => FileIconCode ,
273+ ".pdf" => FileIconPdf ,
274+ ".zip" or ".rar" or ".iso" => FileIconZip ,
275+ ".txt" or ".log" => FileIconArchive ,
276+ ".jpg" or ".jpeg" or ".png" or ".bmp" or ".gif" => FileIconImage ,
277+ _ => FileIconFile
278+ } ;
266279}
You can’t perform that action at this time.
0 commit comments