@cocreate/file 1.15.1 → 1.16.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.16.0](https://github.com/CoCreate-app/CoCreate-file/compare/v1.15.2...v1.16.0) (2024-02-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * if realtime save on file selection ([de3c32c](https://github.com/CoCreate-app/CoCreate-file/commit/de3c32cdf3a1a1c18424ef0e8554fab40a85411d))
7
+
8
+ ## [1.15.2](https://github.com/CoCreate-app/CoCreate-file/compare/v1.15.1...v1.15.2) (2024-02-14)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * realtime defaults to false ([c6fb16c](https://github.com/CoCreate-app/CoCreate-file/commit/c6fb16c6f634c9a0eac244884913941963e5807b))
14
+
1
15
  ## [1.15.1](https://github.com/CoCreate-app/CoCreate-file/compare/v1.15.0...v1.15.1) (2024-02-13)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file",
3
- "version": "1.15.1",
3
+ "version": "1.16.0",
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",
package/src/client.js CHANGED
@@ -177,8 +177,11 @@ async function fileEvent(event) {
177
177
 
178
178
  const isImport = input.getAttribute('import')
179
179
  const isRealtime = input.getAttribute('realtime')
180
- if (isRealtime !== 'false' && (isImport || isImport == "")) {
181
- Import(input)
180
+ if (isRealtime && isRealtime !== 'false') {
181
+ if (isImport || isImport == "") {
182
+ Import(input)
183
+ } else if (input.save)
184
+ input.save()
182
185
  }
183
186
  }
184
187
  } catch (error) {