MCPcopy Create free account
hub / github.com/bytebase/bytebase / getExportFileType

Function getExportFileType

frontend/src/react/components/DataExportButton.tsx:111–124  ·  view source on GitHub ↗
(format: ExportFormat)

Source from the content-addressed store, hash-verified

109};
110
111const getExportFileType = (format: ExportFormat) => {
112 switch (format) {
113 case ExportFormat.CSV:
114 return "text/csv";
115 case ExportFormat.JSON:
116 return "application/json";
117 case ExportFormat.SQL:
118 return "application/sql";
119 case ExportFormat.XLSX:
120 return "application/vnd.ms-excel";
121 default:
122 return "application/octet-stream";
123 }
124};
125
126const toBlob = (
127 { content, filename }: DownloadContent,

Callers 1

toBlobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected