All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.common.resources.lib.fileupload.angular-file-upload-html5-shim.js Maven / Gradle / Ivy

/**!
 * AngularJS file upload shim for angular XHR HTML5 browsers
 * @author  Danial  
 * @version 1.1.10
 */
if (window.XMLHttpRequest) {
        if (window.FormData) {
                // allow access to Angular XHR private field: https://github.com/angular/angular.js/issues/1934
                XMLHttpRequest = (function(origXHR) {
                        return function() {
                                var xhr = new origXHR();
                                xhr.send = (function(orig) {
                                        return function() {
                                                if (arguments[0] instanceof FormData && arguments[0].__setXHR_) {
                                                        var formData = arguments[0];
                                                        formData.__setXHR_(xhr);
                                                }
                                                orig.apply(xhr, arguments);
                                        }
                                })(xhr.send);
                                return xhr;
                        }
                })(XMLHttpRequest);
        }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy