We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e508144 commit db9d9f7Copy full SHA for db9d9f7
src/index.js
@@ -144,7 +144,9 @@ class CoCreateFileSystem {
144
}
145
146
let contentType = file['content-type'] || 'text/html';
147
- if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
+ if (contentType === 'image/svg+xml')
148
+ contentType = contentType
149
+ else if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
150
src = src.replace(/^data:image\/(png|jpeg|jpg);base64,/, '');
151
src = Buffer.from(src, 'base64');
152
} else if (contentType === 'text/html') {
0 commit comments