@cocreate/file-server 1.0.17 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/index.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.0.19](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.18...v1.0.19) (2022-12-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* testing ([a9c7cd9](https://github.com/CoCreate-app/CoCreate-file-server/commit/a9c7cd98ec6dfb6097b7c57f70f737818478cd5b))
|
|
7
|
+
|
|
8
|
+
## [1.0.18](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.17...v1.0.18) (2022-12-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* testing ([7a1ce15](https://github.com/CoCreate-app/CoCreate-file-server/commit/7a1ce15a12057260eeb9f121fdc21a26ca22df4d))
|
|
14
|
+
|
|
1
15
|
## [1.0.17](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.16...v1.0.17) (2022-12-05)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -93,12 +93,17 @@ class CoCreateFileSystem {
|
|
|
93
93
|
console.log('src', contentType)
|
|
94
94
|
|
|
95
95
|
if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
|
|
96
|
+
console.log('before media', contentType, src)
|
|
97
|
+
|
|
96
98
|
var base64Data = src.replace(/^data:image\/(png|jpeg|jpg);base64,/, '');
|
|
97
99
|
let file = Buffer.from(base64Data, 'base64');
|
|
100
|
+
console.log('file', contentType, file)
|
|
101
|
+
|
|
98
102
|
res.writeHead(200, {
|
|
99
103
|
'Content-Type': contentType,
|
|
100
104
|
'Content-Length': file.length
|
|
101
105
|
});
|
|
106
|
+
console.log('after write', contentType)
|
|
102
107
|
res.send(file);
|
|
103
108
|
} else if (contentType === 'text/html') {
|
|
104
109
|
try {
|