feat: download of text/csv now uses .csv extension (#7141)

This commit is contained in:
axel584
2021-03-30 22:06:00 +02:00
committed by GitHub
parent 4103e0f919
commit 75865f31ec

View File

@@ -116,6 +116,10 @@ export default class ResponseBody extends React.PureComponent {
} else if (toLower(contentType) === "text/html" || /text\/plain/.test(contentType)) {
bodyEl = <HighlightCode downloadable fileName={`${downloadName}.html`} value={ content } getConfigs={ getConfigs } canCopy />
// CSV
} else if (toLower(contentType) === "text/csv" || /text\/csv/.test(contentType)) {
bodyEl = <HighlightCode downloadable fileName={`${downloadName}.csv`} value={ content } getConfigs={ getConfigs } canCopy />
// Image
} else if (/^image\//i.test(contentType)) {
if(contentType.includes("svg")) {