Skip to content

Commit

Permalink
feat: download of text/csv now uses .csv extension (#7141)
Browse files Browse the repository at this point in the history
  • Loading branch information
axel584 authored Mar 30, 2021
1 parent 4103e0f commit 75865f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/components/response-body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit 75865f3

Please sign in to comment.