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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3e7a877f76c17877c994a39090c65de1a148906
|
|
4
|
+
data.tar.gz: ca5591d57d23b988fa881a6239601d2b032f666b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbdbffc0247d7d8242bd723d206c8fbab6c6f361d488e96c562dbe32698bd50ec26dfc6b4fc2f2ba2c84e0580d6d25c7022fbd16c49e6c9b5cbe113b57e61455
|
|
7
|
+
data.tar.gz: e3cc17832f0dd91a02904e304219a1451019c8e6ba2de713363c619bd5a954538ff8b505cf3e5cd6d8cb5de12885a4caca9fb1be4017efc230fa22179e433d8e
|
|
Binary file
|
|
@@ -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);
|