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 090a5e5 commit 1005ab3Copy full SHA for 1005ab3
src/index.js
@@ -144,9 +144,7 @@ class CoCreateFileSystem {
144
}
145
146
let contentType = file['content-type'] || 'text/html';
147
- if (contentType === 'image/svg+xml')
148
- contentType = contentType
149
- else if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
+ if (/^[A-Za-z0-9+/]+[=]{0,2}$/.test(src)) {
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