correct excel mime types (#2596)
* correct excel mime types * address PR issue * remove use of wildcard
This commit is contained in:
parent
88f7fb2852
commit
1a0e187561
@ -65,7 +65,7 @@ public class XlsExporter implements StreamExporter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getContentType() {
|
public String getContentType() {
|
||||||
return xml ? "application/xlsx" : "application/xls";
|
return xml ? "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/vnd.ms-excel";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -106,6 +106,11 @@ public class XlsExporterTests extends RefineTest {
|
|||||||
options = null;
|
options = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getContentType(){
|
||||||
|
Assert.assertEquals(SUT.getContentType(), "application/vnd.ms-excel");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void exportSimpleXls(){
|
public void exportSimpleXls(){
|
||||||
CreateGrid(2, 2);
|
CreateGrid(2, 2);
|
||||||
|
@ -110,6 +110,11 @@ public class XlsxExporterTests extends RefineTest {
|
|||||||
options = null;
|
options = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getContentType(){
|
||||||
|
Assert.assertEquals(SUT.getContentType(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void exportSimpleXlsx(){
|
public void exportSimpleXlsx(){
|
||||||
CreateGrid(2, 2);
|
CreateGrid(2, 2);
|
||||||
|
@ -291,7 +291,9 @@ function registerImporting() {
|
|||||||
IM.registerMimeType("application/x-excel", "binary/text/xml/xls/xlsx");
|
IM.registerMimeType("application/x-excel", "binary/text/xml/xls/xlsx");
|
||||||
IM.registerMimeType("application/xls", "binary/text/xml/xls/xlsx");
|
IM.registerMimeType("application/xls", "binary/text/xml/xls/xlsx");
|
||||||
IM.registerMimeType("application/x-xls", "binary/text/xml/xls/xlsx");
|
IM.registerMimeType("application/x-xls", "binary/text/xml/xls/xlsx");
|
||||||
|
IM.registerMimeType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "binary/text/xml/xls/xlsx");
|
||||||
|
IM.registerMimeType("application/vnd.openxmlformats-officedocument.spreadsheetml.template", "binary/text/xml/xls/xlsx");
|
||||||
|
|
||||||
IM.registerMimeType("application/vnd.oasis.opendocument.spreadsheet","text/xml/ods");
|
IM.registerMimeType("application/vnd.oasis.opendocument.spreadsheet","text/xml/ods");
|
||||||
|
|
||||||
IM.registerMimeType("application/json", "text/json");
|
IM.registerMimeType("application/json", "text/json");
|
||||||
|
Loading…
Reference in New Issue
Block a user