universal_s3_uploader 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23bcfd0f65f38b3820b913d15b2dd1d57a1f1b8e
4
- data.tar.gz: 713abe2b9671eb1e9bdfe1feff61687a14344841
3
+ metadata.gz: d3e7a877f76c17877c994a39090c65de1a148906
4
+ data.tar.gz: ca5591d57d23b988fa881a6239601d2b032f666b
5
5
  SHA512:
6
- metadata.gz: 83d10d89281f141c4fabb4d6579f466c6cbc869d4ad40a69e576ea9a67e3eda02a1eabf10cbb097aad5dad2176eb4c403e3b70e282117d3cdc5f575d76b95c12
7
- data.tar.gz: d4d5f0c58e66b1bea76472511580f41d1627cac77089998035d83597a18a09b7f5829db6bbc4e91869b255eeffe0709cff71cf41e1ee455bd9f266b02c2566e4
6
+ metadata.gz: fbdbffc0247d7d8242bd723d206c8fbab6c6f361d488e96c562dbe32698bd50ec26dfc6b4fc2f2ba2c84e0580d6d25c7022fbd16c49e6c9b5cbe113b57e61455
7
+ data.tar.gz: e3cc17832f0dd91a02904e304219a1451019c8e6ba2de713363c619bd5a954538ff8b505cf3e5cd6d8cb5de12885a4caca9fb1be4017efc230fa22179e433d8e
@@ -1,3 +1,3 @@
1
1
  module UniversalS3Uploader
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.4'
3
3
  end
@@ -30,6 +30,10 @@
30
30
  onSuccess: function(index, filename, event)
31
31
  {
32
32
  console.log(index + " was successfully uploaded.");
33
+ },
34
+ opResponse: function(index, filename, response)
35
+ {
36
+ console.log(response);
33
37
  }
34
38
  };
35
39
 
@@ -118,11 +122,18 @@
118
122
  return function(event) { $.proxy(func, this)(index, file.name, event); }
119
123
  }
120
124
 
125
+ var onResponse = this.options.onResponse;
126
+ function callResponseHandler(event)
127
+ {
128
+ onResponse(index, file.name, this.response);
129
+ }
130
+
121
131
  var xhr = new XMLHttpRequest();
122
132
 
123
133
  xhr.addEventListener("loadstart", passIndexFilename(this.options.onLoadstart), false);
124
134
  xhr.upload.addEventListener("progress", passIndexFilename(this.options.onProgress), false);
125
135
  xhr.addEventListener("load", passIndexFilename(this.options.onSuccess), false);
136
+ xhr.addEventListener("load", callResponseHandler, false);
126
137
 
127
138
  xhr.open('POST', this.element.attr('action'), true);
128
139
  xhr.send(fd);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: universal_s3_uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dohan Kim