File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
src/BootstrapBlazor/Components/Upload Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 2525 dotnet test test/UnitTest --collect:"XPlat Code Coverage"
2626
2727 - name : Upload to Codecov
28- uses : codecov/codecov-action@v4
28+ uses : codecov/codecov-action@v5
2929 with :
3030 token : ${{ secrets.CODECOV_TOKEN }}
31+ flags : BB
Original file line number Diff line number Diff line change 3232 dotnet test test/UnitTest --collect:"XPlat Code Coverage"
3333
3434 - name : Upload to Codecov
35- uses : codecov/codecov-action@v4
35+ uses : codecov/codecov-action@v5
3636 with :
3737 token : ${{ secrets.CODECOV_TOKEN }}
3838
Original file line number Diff line number Diff line change @@ -252,17 +252,17 @@ private async Task OnClickCancel(UploadFile item)
252252 private string ? GetFileFormatClassString ( UploadFile item )
253253 {
254254 var builder = CssBuilder . Default ( "file-icon" ) ;
255- var fileExtension = Path . GetExtension ( item . OriginFileName ?? item . FileName ) ;
255+ var fileExtension = Path . GetExtension ( item . GetFileName ( ) ) ;
256256 if ( ! string . IsNullOrEmpty ( fileExtension ) )
257257 {
258258 fileExtension = fileExtension . ToLowerInvariant ( ) ;
259+ var icon = OnGetFileFormat ? . Invoke ( fileExtension ) ?? GetFileExtensions ( fileExtension ) ;
260+ builder . AddClass ( icon ) ;
259261 }
260- var icon = OnGetFileFormat ? . Invoke ( fileExtension ) ?? GetFileExtensions ( fileExtension ) ;
261- builder . AddClass ( icon ) ;
262262 return builder . Build ( ) ;
263263 }
264264
265- private string ? GetFileExtensions ( string ? fileExtension ) => fileExtension switch
265+ private string ? GetFileExtensions ( string fileExtension ) => fileExtension switch
266266 {
267267 ".csv" or ".xls" or ".xlsx" => FileIconExcel ,
268268 ".doc" or ".docx" or ".dot" or ".dotx" => FileIconDocx ,
Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ public void ButtonUpload_OnGetFileFormat_Ok()
362362 new ( ) { FileName = "1.doc" } ,
363363 new ( ) { FileName = "1.docx" } ,
364364 new ( ) { FileName = "1.dot" } ,
365+ new ( ) { FileName = "1.dotx" } ,
365366 new ( ) { FileName = "1.ppt" } ,
366367 new ( ) { FileName = "1.pptx" } ,
367368 new ( ) { FileName = "1.wav" } ,
@@ -397,7 +398,6 @@ public void ButtonUpload_OnGetFileFormat_Ok()
397398 cut . Contains ( "fa-file-archive" ) ;
398399 cut . Contains ( "fa-file-text" ) ;
399400 cut . Contains ( "fa-file-image" ) ;
400- cut . Contains ( "fa-file-archive" ) ;
401401 cut . Contains ( "fa-file" ) ;
402402
403403 cut . SetParametersAndRender ( pb =>
You can’t perform that action at this time.
0 commit comments