This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +47
-8
lines changed Expand file tree Collapse file tree 1 file changed +47
-8
lines changed Original file line number Diff line number Diff line change @@ -1560,12 +1560,17 @@ public static string GetMimeType(string fileNameOrExt)
1560
1560
switch ( fileExt )
1561
1561
{
1562
1562
case "jpeg" :
1563
+ return "image/jpeg" ;
1563
1564
case "gif" :
1565
+ return "image/gif" ;
1564
1566
case "png" :
1567
+ return "image/png" ;
1565
1568
case "tiff" :
1569
+ return "image/tiff" ;
1566
1570
case "bmp" :
1571
+ return "image/bmp" ;
1567
1572
case "webp" :
1568
- return "image/" + fileExt ;
1573
+ return "image/webp" ;
1569
1574
1570
1575
case "jpg" :
1571
1576
return "image/jpeg" ;
@@ -1586,10 +1591,8 @@ public static string GetMimeType(string fileNameOrExt)
1586
1591
1587
1592
case "js" :
1588
1593
return "text/javascript" ;
1589
-
1590
1594
case "ts" :
1591
- return "text/x.typescript" ;
1592
-
1595
+ return "text/typescript" ;
1593
1596
case "jsx" :
1594
1597
return "text/jsx" ;
1595
1598
@@ -1598,12 +1601,49 @@ public static string GetMimeType(string fileNameOrExt)
1598
1601
case "css" :
1599
1602
return Css ;
1600
1603
1601
- case "sgml" :
1602
- return "text/" + fileExt ;
1604
+ case "cs" :
1605
+ return "text/x-csharp" ;
1606
+ case "fs" :
1607
+ return "text/x-fsharp" ;
1608
+ case "vb" :
1609
+ return "text/x-vb" ;
1610
+ case "dart" :
1611
+ return "application/dart" ;
1612
+ case "go" :
1613
+ return "text/x-go" ;
1614
+ case "kt" :
1615
+ case "kts" :
1616
+ return "text/x-kotlin" ;
1617
+ case "java" :
1618
+ return "text/x-java" ;
1619
+ case "py" :
1620
+ return "text/x-python" ;
1621
+ case "groovy" :
1622
+ case "gradle" :
1623
+ return "text/x-groovy" ;
1624
+
1625
+ case "yml" :
1626
+ case "yaml" :
1627
+ return YamlText ;
1628
+
1629
+ case "sh" :
1630
+ return "text/x-sh" ;
1631
+ case "bat" :
1632
+ case "cmd" :
1633
+ return "application/bat" ;
1634
+
1635
+ case "xml" :
1636
+ case "csproj" :
1637
+ case "fsproj" :
1638
+ case "vbproj" :
1639
+ return "text/xml" ;
1603
1640
1604
1641
case "txt" :
1605
1642
return "text/plain" ;
1606
1643
1644
+ case "sgml" :
1645
+ return "text/sgml" ;
1646
+
1607
1647
case "mp3" :
1608
1648
return "audio/mpeg3" ;
1609
1649
@@ -1722,7 +1762,7 @@ public static string GetMimeType(string fileNameOrExt)
1722
1762
1723
1763
case "jar" :
1724
1764
return Jar ;
1725
-
1765
+
1726
1766
case "aaf" :
1727
1767
case "aca" :
1728
1768
case "asd" :
@@ -1740,7 +1780,6 @@ public static string GetMimeType(string fileNameOrExt)
1740
1780
case "fla" :
1741
1781
case "ics" :
1742
1782
case "inf" :
1743
- case "java" :
1744
1783
case "mix" :
1745
1784
case "msi" :
1746
1785
case "mso" :
You can’t perform that action at this time.
0 commit comments