@cocreate/file-server 1.11.3 → 1.12.0
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 +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.12.0](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.11.4...v1.12.0) (2023-10-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Identify base64 strings and convert to buffer for response ([1005ab3](https://github.com/CoCreate-app/CoCreate-file-server/commit/1005ab3a787170be4ec62c26f0daa16ced4f37b6))
|
|
7
|
+
|
|
8
|
+
## [1.11.4](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.11.3...v1.11.4) (2023-10-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([7b7deeb](https://github.com/CoCreate-app/CoCreate-file-server/commit/7b7deeba7ec16f05985f418007cf0da006d01cd7))
|
|
14
|
+
|
|
1
15
|
## [1.11.3](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.11.2...v1.11.3) (2023-10-09)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -144,9 +144,7 @@ class CoCreateFileSystem {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
let contentType = file['content-type'] || 'text/html';
|
|
147
|
-
if (
|
|
148
|
-
contentType = contentType
|
|
149
|
-
else if (contentType.startsWith('image/') || contentType.startsWith('audio/') || contentType.startsWith('video/')) {
|
|
147
|
+
if (/^[A-Za-z0-9+/]+[=]{0,2}$/.test(src)) {
|
|
150
148
|
src = src.replace(/^data:image\/(png|jpeg|jpg);base64,/, '');
|
|
151
149
|
src = Buffer.from(src, 'base64');
|
|
152
150
|
} else if (contentType === 'text/html') {
|