Skip to content

Commit

Permalink
Fix for #1071
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Farid authored and Danial Farid committed Oct 20, 2015
1 parent 0aecee7 commit 38128f6
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 42 deletions.
14 changes: 10 additions & 4 deletions demo/src/main/webapp/js/FileAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
return attr in input;
},

_support

/**
* FileAPI (core object)
Expand Down Expand Up @@ -340,9 +341,9 @@
},

log: function (){
if( api.debug && window.console && console.log ){
// ngf fix for IE8 #1071
if( typeof console.log.apply === 'function' ){
// ngf fix for IE8 #1071
if( api.debug && _supportConsoleLog ){
if( _supportConsoleLogApply ){
console.log.apply(console, arguments);
}
else {
Expand Down Expand Up @@ -1792,7 +1793,12 @@
});


// @configuration
// configuration
try {
_supportConsoleLog = !!console.log;
_supportConsoleLogApply = !!console.log.apply;
} catch (err) {}

if( !api.flashUrl ){ api.flashUrl = api.staticPath + 'FileAPI.flash.swf'; }
if( !api.flashImageUrl ){ api.flashImageUrl = api.staticPath + 'FileAPI.flash.image.swf'; }
if( !api.flashWebcamUrl ){ api.flashWebcamUrl = api.staticPath + 'FileAPI.flash.camera.swf'; }
Expand Down
6 changes: 3 additions & 3 deletions demo/src/main/webapp/js/FileAPI.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions demo/src/main/webapp/js/ng-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

(function () {
Expand Down Expand Up @@ -427,7 +427,7 @@ if (!window.FileReader) {
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -448,7 +448,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '9.0.17';
ngFileUpload.version = '9.0.18';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload-all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/src/main/webapp/js/ng-file-upload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

(function () {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/webapp/js/ng-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -23,7 +23,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '9.0.17';
ngFileUpload.version = '9.0.18';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/js/ng-file-upload.min.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions dist/FileAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
return attr in input;
},

_support

/**
* FileAPI (core object)
Expand Down Expand Up @@ -340,9 +341,9 @@
},

log: function (){
if( api.debug && window.console && console.log ){
// ngf fix for IE8 #1071
if( typeof console.log.apply === 'function' ){
// ngf fix for IE8 #1071
if( api.debug && _supportConsoleLog ){
if( _supportConsoleLogApply ){
console.log.apply(console, arguments);
}
else {
Expand Down Expand Up @@ -1792,7 +1793,12 @@
});


// @configuration
// configuration
try {
_supportConsoleLog = !!console.log;
_supportConsoleLogApply = !!console.log.apply;
} catch (err) {}

if( !api.flashUrl ){ api.flashUrl = api.staticPath + 'FileAPI.flash.swf'; }
if( !api.flashImageUrl ){ api.flashImageUrl = api.staticPath + 'FileAPI.flash.image.swf'; }
if( !api.flashWebcamUrl ){ api.flashWebcamUrl = api.staticPath + 'FileAPI.flash.camera.swf'; }
Expand Down
6 changes: 3 additions & 3 deletions dist/FileAPI.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ng-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

(function () {
Expand Down Expand Up @@ -427,7 +427,7 @@ if (!window.FileReader) {
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -448,7 +448,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '9.0.17';
ngFileUpload.version = '9.0.18';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-file-upload-all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ng-file-upload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

(function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/ng-file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <danial.farid@gmail.com>
* @version 9.0.17
* @version 9.0.18
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -23,7 +23,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '9.0.17';
ngFileUpload.version = '9.0.18';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-file-upload.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 38128f6

Please sign in to comment.