@cocreate/file-server 1.19.0 → 1.19.1
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 +7 -0
- package/package.json +1 -1
- package/src/index.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.19.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.19.0...v1.19.1) (2026-04-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* video and audio handling ([e7b67c6](https://github.com/CoCreate-app/CoCreate-file-server/commit/e7b67c66930d309b1deeefda5720134106de2b91))
|
|
7
|
+
|
|
1
8
|
# [1.19.0](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.18.10...v1.19.0) (2026-04-08)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -254,9 +254,9 @@ class CoCreateFileSystem {
|
|
|
254
254
|
return d.data;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
// Raster images and
|
|
257
|
+
// Raster images, Icons, Video, and Audio -> Buffer
|
|
258
258
|
// Added x-icon, vnd.microsoft.icon, and ico to process icon files properly
|
|
259
|
-
if (/^image\/(png|jpe?g|webp|bmp|gif|x-icon|vnd\.microsoft\.icon|ico)$/i.test(d.mime)) {
|
|
259
|
+
if (/^(image\/(png|jpe?g|webp|bmp|gif|x-icon|vnd\.microsoft\.icon|ico)|video\/.*|audio\/.*)$/i.test(d.mime)) {
|
|
260
260
|
if (d.isBase64) return Buffer.from(d.data, "base64");
|
|
261
261
|
}
|
|
262
262
|
// If it's a text data URI (e.g., xml) and not base64, return decoded text
|
|
@@ -275,6 +275,8 @@ class CoCreateFileSystem {
|
|
|
275
275
|
if (
|
|
276
276
|
contentType.startsWith("image/") ||
|
|
277
277
|
contentType.startsWith("font/") ||
|
|
278
|
+
contentType.startsWith("video/") ||
|
|
279
|
+
contentType.startsWith("audio/") ||
|
|
278
280
|
contentType === "application/octet-stream"
|
|
279
281
|
) {
|
|
280
282
|
return Buffer.from(src, "base64");
|