dropzonejs-rails 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb06c40c8dffd3c26a74bfa8ddd3e85304833fae
4
- data.tar.gz: f69288d7791c83f923fb7fed4e58834a86a4e57c
3
+ metadata.gz: 1ce8d9c87a67d144bd37b73019cfe0c65001c20f
4
+ data.tar.gz: f8ff05f255fa0d7b5808cc5f1406cc8c83a3d38f
5
5
  SHA512:
6
- metadata.gz: c897e11aa006cdb081f245bd9a1039eacc8642969d12001fda015f9066945295cd1e5855ebcdc8c253b0c66d4651a2dbc788c61630742d331942d086039a07b0
7
- data.tar.gz: 7d94fe29bd14a7493a27007f37367be103234ebadc3bbb56bf8a59554e74facf88c8f6c843a7e979cdbd358f18e9b525bd0ce2ecd1eec271cc7800284412bf0a
6
+ metadata.gz: f9cd973dbb3da3b69236899301f7e1ff35a0906750bfb7dfacdc21f244ce75bab087e053d1ac2d0b79be9b926786fe4555db9f68e004dbe824ae15d5e643a4c9
7
+ data.tar.gz: 8e923bc82b1d9323c332fbba7e642d2d9d77024e5f54bd6b2ebe3eaba298b53b2a056bb9dad3a0047f9d7abdbdf9625686101bf8d21e8a2f69f7dc3f0478abfb
data/README.md CHANGED
@@ -4,7 +4,7 @@ Integrate [Matias Meno's Dropzone](http://www.dropzonejs.com/) awesome file uplo
4
4
 
5
5
  ## Version
6
6
 
7
- The latest version of this gem bundles **Dropzone v5.1.0**.
7
+ The latest version of this gem bundles **Dropzone v5.1.1**.
8
8
 
9
9
  ### Dropzone 4.x
10
10
 
@@ -67,8 +67,10 @@ Go to [this secret place](https://github.com/ncuesta/dropzonejs-rails/issues).
67
67
 
68
68
  ## Changelog
69
69
 
70
+ * v0.8.1
71
+ * Updates Dropzone to 5.1.1 **#44 by [@lerarybak](https://github.com/lerarybak).**
70
72
  * v0.8.0
71
- * Updates Dropzone to the 5.1 branch. **#43 By [@lerarybak](https://github.com/lerarybak).**
73
+ * Updates Dropzone to the 5.1 branch. **#43 by [@lerarybak](https://github.com/lerarybak).**
72
74
  * v0.7.4
73
75
  * Refactors rake tasks for better separation of concerns and a cleaner use. **#41 By [@thomasstephane](https://github.com/thomasstephane).**
74
76
  * v0.7.0
@@ -293,7 +293,7 @@
293
293
  ref = file.previewElement.querySelectorAll("[data-dz-name]");
294
294
  for (j = 0, len = ref.length; j < len; j++) {
295
295
  node = ref[j];
296
- node.textContent = file.upload.filename;
296
+ node.textContent = file.name;
297
297
  }
298
298
  ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
299
299
  for (k = 0, len1 = ref1.length; k < len1; k++) {
@@ -1368,11 +1368,9 @@
1368
1368
  progress = 100 * e.loaded / e.total;
1369
1369
  for (k = 0, len1 = files.length; k < len1; k++) {
1370
1370
  file = files[k];
1371
- file.upload = {
1372
- progress: progress,
1373
- total: e.total,
1374
- bytesSent: e.loaded
1375
- };
1371
+ file.upload.progress = progress;
1372
+ file.upload.total = e.total;
1373
+ file.upload.bytesSent = e.loaded;
1376
1374
  }
1377
1375
  } else {
1378
1376
  allFilesFinished = true;
@@ -1406,13 +1404,15 @@
1406
1404
  if (xhr.readyState !== 4) {
1407
1405
  return;
1408
1406
  }
1409
- response = xhr.responseText;
1410
- if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
1411
- try {
1412
- response = JSON.parse(response);
1413
- } catch (error1) {
1414
- e = error1;
1415
- response = "Invalid JSON response from server.";
1407
+ if (xhr.responseType !== 'arraybuffer' && xhr.responseType !== 'blob') {
1408
+ response = xhr.responseText;
1409
+ if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
1410
+ try {
1411
+ response = JSON.parse(response);
1412
+ } catch (error1) {
1413
+ e = error1;
1414
+ response = "Invalid JSON response from server.";
1415
+ }
1416
1416
  }
1417
1417
  }
1418
1418
  updateProgress();
@@ -1541,7 +1541,7 @@
1541
1541
 
1542
1542
  })(Emitter);
1543
1543
 
1544
- Dropzone.version = "5.1.0";
1544
+ Dropzone.version = "5.1.1";
1545
1545
 
1546
1546
  Dropzone.options = {};
1547
1547
 
@@ -1,4 +1,4 @@
1
1
  module DropzonejsRails
2
- VERSION = '0.8.0'
3
- DROPZONE_VERSION = '5.1.0'
2
+ VERSION = '0.8.1'
3
+ DROPZONE_VERSION = '5.1.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropzonejs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Nahuel Cuesta Luengo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-14 00:00:00.000000000 Z
11
+ date: 2017-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit