Skip to content

Commit e9e0705

Browse files
authored
Merge pull request scratchfoundation#5088 from chrisgarrity/export-custom-mimetype
Get the mime-type for the file from the blob
2 parents 3252a33 + 8c94fef commit e9e0705

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/download-blob.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default (filename, blob) => {
1111
const url = window.URL.createObjectURL(blob);
1212
downloadLink.href = url;
1313
downloadLink.download = filename;
14+
downloadLink.type = blob.type;
1415
downloadLink.click();
1516
window.URL.revokeObjectURL(url);
1617
document.body.removeChild(downloadLink);

0 commit comments

Comments
 (0)