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
|
||||
public String getContentType() {
|
||||
return xml ? "application/xlsx" : "application/xls";
|
||||
return xml ? "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/vnd.ms-excel";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -106,6 +106,11 @@ public class XlsExporterTests extends RefineTest {
|
||||
options = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getContentType(){
|
||||
Assert.assertEquals(SUT.getContentType(), "application/vnd.ms-excel");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exportSimpleXls(){
|
||||
CreateGrid(2, 2);
|
||||
|
@ -110,6 +110,11 @@ public class XlsxExporterTests extends RefineTest {
|
||||
options = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getContentType(){
|
||||
Assert.assertEquals(SUT.getContentType(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void exportSimpleXlsx(){
|
||||
CreateGrid(2, 2);
|
||||
|
@ -291,6 +291,8 @@ function registerImporting() {
|
||||
IM.registerMimeType("application/x-excel", "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/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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user