@cocreate/file 1.9.4 → 1.9.6
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 +5 -5
- package/src/client.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.9.6](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.5...v1.9.6) (2023-10-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* await getValue() ([93a475a](https://github.com/CoCreate-app/CoCreate-file/commit/93a475ae31a77d9dd804b87539524fe75a8249b6))
|
|
7
|
+
|
|
8
|
+
## [1.9.5](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.4...v1.9.5) (2023-10-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([b922b43](https://github.com/CoCreate-app/CoCreate-file/commit/b922b43fd21485db0be2397c2a9c113c7a3a586b))
|
|
14
|
+
|
|
1
15
|
## [1.9.4](https://github.com/CoCreate-app/CoCreate-file/compare/v1.9.3...v1.9.4) (2023-10-09)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/file",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
4
4
|
"description": "A headless file uploader that uses HTML5 attributes for customization. Allows easy upload of files to server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"file",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"webpack-log": "^3.0.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cocreate/actions": "^1.11.
|
|
63
|
-
"@cocreate/config": "^1.6.
|
|
64
|
-
"@cocreate/render": "^1.28.
|
|
65
|
-
"@cocreate/utils": "^1.25.
|
|
62
|
+
"@cocreate/actions": "^1.11.6",
|
|
63
|
+
"@cocreate/config": "^1.6.4",
|
|
64
|
+
"@cocreate/render": "^1.28.3",
|
|
65
|
+
"@cocreate/utils": "^1.25.3"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/client.js
CHANGED
|
@@ -203,7 +203,7 @@ async function getFiles(fileInputs) {
|
|
|
203
203
|
if (!file.src)
|
|
204
204
|
file = await readFile(file)
|
|
205
205
|
|
|
206
|
-
file = getCustomData({ ...file })
|
|
206
|
+
file = await getCustomData({ ...file })
|
|
207
207
|
files.push(file)
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -213,14 +213,14 @@ async function getFiles(fileInputs) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// gets file custom data
|
|
216
|
-
function getCustomData(file) {
|
|
216
|
+
async function getCustomData(file) {
|
|
217
217
|
let form = document.querySelector(`[file_id="${file.id}"]`);
|
|
218
218
|
if (form) {
|
|
219
219
|
let elements = form.querySelectorAll('[file]');
|
|
220
220
|
for (let i = 0; i < elements.length; i++) {
|
|
221
221
|
let name = elements[i].getAttribute('file')
|
|
222
222
|
if (name) {
|
|
223
|
-
file[name] = elements[i].getValue()
|
|
223
|
+
file[name] = await elements[i].getValue()
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|