Skip to content

Commit a9c7cd9

Browse files
committed
fix: testing
1 parent c9a1f41 commit a9c7cd9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ class CoCreateFileSystem {
9393
console.log('src', contentType)
9494

9595
if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
96+
console.log('before media', contentType, src)
97+
9698
var base64Data = src.replace(/^data:image\/(png|jpeg|jpg);base64,/, '');
9799
let file = Buffer.from(base64Data, 'base64');
100+
console.log('file', contentType, file)
101+
98102
res.writeHead(200, {
99103
'Content-Type': contentType,
100104
'Content-Length': file.length
101105
});
102-
console.log('before media', contentType)
106+
console.log('after write', contentType)
103107
res.send(file);
104108
} else if (contentType === 'text/html') {
105109
try {

0 commit comments

Comments
 (0)