@cocreate/url-uploader 1.2.1 → 1.2.3
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/.github/workflows/automated.yml +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/release.config.js +1 -1
- package/src/index.js +2 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.2.2](https://github.com/CoCreate-app/CoCreate-url-uploader/compare/v1.2.1...v1.2.2) (2026-07-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* set default branch to main ([5fdbaaf](https://github.com/CoCreate-app/CoCreate-url-uploader/commit/5fdbaaf61241735844b80b44da10f2d2334e0507))
|
|
7
|
+
|
|
1
8
|
## [1.2.1](https://github.com/CoCreate-app/CoCreate-url-uploader/compare/v1.2.0...v1.2.1) (2026-07-17)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/url-uploader",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "A simple url-uploader component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"url-uploader",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"type": "module",
|
|
38
38
|
"main": "./src/index.js",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"
|
|
40
|
+
"@cocreate/server": "^1.6.1"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/release.config.js
CHANGED
package/src/index.js
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
// For details, visit <https://cocreate.app/licenses/> or contact us at sales@cocreate.app.
|
|
22
22
|
|
|
23
23
|
import { URL } from "url";
|
|
24
|
-
import fetch from "node-fetch";
|
|
25
24
|
import server from "@cocreate/server";
|
|
26
25
|
|
|
27
26
|
/**
|
|
@@ -30,13 +29,7 @@ import server from "@cocreate/server";
|
|
|
30
29
|
* @returns {string} Base64 formatted string
|
|
31
30
|
*/
|
|
32
31
|
function arrayBufferToBase64(buffer) {
|
|
33
|
-
|
|
34
|
-
const bytes = new Uint8Array(buffer);
|
|
35
|
-
const len = bytes.byteLength;
|
|
36
|
-
for (let i = 0; i < len; i++) {
|
|
37
|
-
binary += String.fromCharCode(bytes[i]);
|
|
38
|
-
}
|
|
39
|
-
return Buffer.from(binary, "binary").toString("base64");
|
|
32
|
+
return Buffer.from(buffer).toString("base64");
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
/**
|
|
@@ -118,4 +111,4 @@ function init() {
|
|
|
118
111
|
// Auto-execute initialization upon module compilation
|
|
119
112
|
init();
|
|
120
113
|
|
|
121
|
-
export default init;
|
|
114
|
+
export default init;
|