Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 15397a0

Browse files
committed
1.4.1
1 parent 9473c9f commit 15397a0

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

dist/uploader.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-ui-uploader
33
* https://github.com/angular-ui/ui-uploader
4-
* Version: 1.4.0 - 2017-02-14T02:35:18.253Z
4+
* Version: 1.4.1 - 2017-04-20T06:14:06.100Z
55
* License: MIT
66
*/
77

@@ -44,14 +44,15 @@ function uiUploader($log) {
4444

4545
//headers are not shared by requests
4646
var headers = options.headers || {};
47+
var xhrOptions = options.options || {};
4748

4849
for (var i = 0; i < self.files.length; i++) {
4950
if (self.activeUploads == self.options.concurrency) {
5051
break;
5152
}
5253
if (self.files[i].active)
5354
continue;
54-
ajaxUpload(self.files[i], self.options.url, self.options.data, self.options.paramName, headers);
55+
ajaxUpload(self.files[i], self.options.url, self.options.data, self.options.paramName, headers, xhrOptions);
5556
}
5657
}
5758

@@ -78,7 +79,7 @@ function uiUploader($log) {
7879
return (bytes / Math.pow(1024, i)).toFixed(i ? 1 : 0) + ' ' + sizes[isNaN(bytes) ? 0 : i + 1];
7980
}
8081

81-
function ajaxUpload(file, url, data, key, headers) {
82+
function ajaxUpload(file, url, data, key, headers, xhrOptions) {
8283
var xhr, formData, prop;
8384
data = data || {};
8485
key = key || 'file';
@@ -88,7 +89,7 @@ function uiUploader($log) {
8889
xhr = new window.XMLHttpRequest();
8990

9091
// To account for sites that may require CORS
91-
if (data.withCredentials === true) {
92+
if (xhrOptions.withCredentials === true) {
9293
xhr.withCredentials = true;
9394
}
9495

dist/uploader.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-ui-uploader",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"author": "https://github.com/angular-ui/ui-uploader/graphs/contributors",
55
"license": "MIT",
66
"homepage": "https://github.com/angular-ui/ui-uploader",

0 commit comments

Comments
 (0)