client/js/s3/uploader.basic.js
function() {
            var self = this,
                additionalOptions = {
                    aclStore: this._aclStore,
                    getBucket: qq.bind(this._determineBucket, this),
                    getHost: qq.bind(this._determineHost, this),
                    getKeyName: qq.bind(this._determineKeyName, this),
                    iframeSupport: this._options.iframeSupport,
                    objectProperties: this._options.objectProperties,
                    signature: this._options.signature,
                    clockDrift: this._options.request.clockDrift,
                    // pass size limit validation values to include in the request so AWS enforces this server-side
                    validation: {
                        minSizeLimit: this._options.validation.minSizeLimit,
                        maxSizeLimit: this._options.validation.sizeLimit
                    }
                };

            // We assume HTTP if it is missing from the start of the endpoint string.
            qq.override(this._endpointStore, function(super_) {
                return {
                    get: function(id) {
                        var endpoint = super_.get(id);

                        if (endpoint.indexOf("http") < 0) {
                            return "http://" + endpoint;
                        }

                        return endpoint;
                    }
                };
            });

            // Some param names should be lower case to avoid signature mismatches
            qq.override(this._paramsStore, function(super_) {
                return {
                    get: function(id) {
                        var oldParams = super_.get(id),
                            modifiedParams = {};

                        qq.each(oldParams, function(name, val) {
                            var paramName = name;

                            if (qq.indexOf(qq.s3.util.CASE_SENSITIVE_PARAM_NAMES, paramName) < 0) {
                                paramName = paramName.toLowerCase();
                            }

                            modifiedParams[paramName] = qq.isFunction(val) ? val() : val;
                        });

                        return modifiedParams;
                    }
                };
            });

            additionalOptions.signature.credentialsProvider = {
                get: function() {
                    return self._currentCredentials;
                },

                onExpired: function() {
                    var updateCredentials = new qq.Promise(),
                        callbackRetVal = self._options.callbacks.onCredentialsExpired();

                    if (qq.isGenericPromise(callbackRetVal)) {
                        callbackRetVal.then(function(credentials) {
                            try {
                                self.setCredentials(credentials);
                                updateCredentials.success();
                            }
                            catch (error) {
                                self.log("Invalid credentials returned from onCredentialsExpired callback! (" + error.message + ")", "error");
                                updateCredentials.failure("onCredentialsExpired did not return valid credentials.");
                            }
                        }, function(errorMsg) {
                            self.log("onCredentialsExpired callback indicated failure! (" + errorMsg + ")", "error");
                            updateCredentials.failure("onCredentialsExpired callback failed.");
                        });
                    }
                    else {
                        self.log("onCredentialsExpired callback did not return a promise!", "error");
                        updateCredentials.failure("Unexpected return value for onCredentialsExpired.");
                    }

                    return updateCredentials;
                }
            };

            return qq.FineUploaderBasic.prototype._createUploadHandler.call(this, additionalOptions, "s3");
        }
function() {
            var self = this,
                additionalOptions = {
                    aclStore: this._aclStore,
                    getBucket: qq.bind(this._determineBucket, this),
                    getHost: qq.bind(this._determineHost, this),
                    getKeyName: qq.bind(this._determineKeyName, this),
                    iframeSupport: this._options.iframeSupport,
                    objectProperties: this._options.objectProperties,
                    signature: this._options.signature,
                    clockDrift: this._options.request.clockDrift,
                    // pass size limit validation values to include in the request so AWS enforces this server-side
                    validation: {
                        minSizeLimit: this._options.validation.minSizeLimit,
                        maxSizeLimit: this._options.validation.sizeLimit
                    }
                };

            // We assume HTTP if it is missing from the start of the endpoint string.
            qq.override(this._endpointStore, function(super_) {
                return {
                    get: function(id) {
                        var endpoint = super_.get(id);

                        if (endpoint.indexOf("http") < 0) {
                            return "http://" + endpoint;
                        }

                        return endpoint;
                    }
                };
            });

            // Some param names should be lower case to avoid signature mismatches
            qq.override(this._paramsStore, function(super_) {
                return {
                    get: function(id) {
                        var oldParams = super_.get(id),
                            modifiedParams = {};

                        qq.each(oldParams, function(name, val) {
                            var paramName = name;

                            if (qq.indexOf(qq.s3.util.CASE_SENSITIVE_PARAM_NAMES, paramName) < 0) {
                                paramName = paramName.toLowerCase();
                            }

                            modifiedParams[paramName] = qq.isFunction(val) ? val() : val;
                        });

                        return modifiedParams;
                    }
                };
            });

            additionalOptions.signature.credentialsProvider = {
                get: function() {
                    return self._currentCredentials;
                },

                onExpired: function() {
                    var updateCredentials = new qq.Promise(),
                        callbackRetVal = self._options.callbacks.onCredentialsExpired();

                    if (qq.isGenericPromise(callbackRetVal)) {
                        callbackRetVal.then(function(credentials) {
                            try {
                                self.setCredentials(credentials);
                                updateCredentials.success();
                            }
                            catch (error) {
                                self.log("Invalid credentials returned from onCredentialsExpired callback! (" + error.message + ")", "error");
                                updateCredentials.failure("onCredentialsExpired did not return valid credentials.");
                            }
                        }, function(errorMsg) {
                            self.log("onCredentialsExpired callback indicated failure! (" + errorMsg + ")", "error");
                            updateCredentials.failure("onCredentialsExpired callback failed.");
                        });
                    }
                    else {
                        self.log("onCredentialsExpired callback did not return a promise!", "error");
                        updateCredentials.failure("Unexpected return value for onCredentialsExpired.");
                    }

                    return updateCredentials;
                }
            };

            return qq.FineUploaderBasic.prototype._createUploadHandler.call(this, additionalOptions, "s3");
        }
function ( ) { var self = this , additionalOptions = { aclStore : this . _aclStore , getBucket : qq . bind ( this . _determineBucket , this ) , getHost : qq . bind ( this . _determineHost , this ) , getKeyName : qq . bind ( this . _determineKeyName , this ) , iframeSupport : this . _options . iframeSupport , objectProperties : this . _options . objectProperties , signature : this . _options . signature , clockDrift : this . _options . request . clockDrift , // pass size limit validation values to include in the request so AWS enforces this server-side validation : { minSizeLimit : this . _options . validation . minSizeLimit , maxSizeLimit : this . _options . validation . sizeLimit } } ; // We assume HTTP if it is missing from the start of the endpoint string. qq . override ( this . _endpointStore , function ( super_ ) { return { get : function ( id ) { var endpoint = super_ . get ( id ) ; if ( endpoint . indexOf ( "http" ) < 0 ) { return "http://" + endpoint ; } return endpoint ; } } ; } ) ; // Some param names should be lower case to avoid signature mismatches qq . override ( this . _paramsStore , function ( super_ ) { return { get : function ( id ) { var oldParams = super_ . get ( id ) , modifiedParams = { } ; qq . each ( oldParams , function ( name , val ) { var paramName = name ; if ( qq . indexOf ( qq . s3 . util . CASE_SENSITIVE_PARAM_NAMES , paramName ) < 0 ) { paramName = paramName . toLowerCase ( ) ; } modifiedParams [ paramName ] = qq . isFunction ( val ) ? val ( ) : val ; } ) ; return modifiedParams ; } } ; } ) ; additionalOptions . signature . credentialsProvider = { get : function ( ) { return self . _currentCredentials ; } , onExpired : function ( ) { var updateCredentials = new qq . Promise ( ) , callbackRetVal = self . _options . callbacks . onCredentialsExpired ( ) ; if ( qq . isGenericPromise ( callbackRetVal ) ) { callbackRetVal . then ( function ( credentials ) { try { self . setCredentials ( credentials ) ; updateCredentials . success ( ) ; } catch ( error ) { self . log ( "Invalid credentials returned from onCredentialsExpired callback! (" + error . message + ")" , "error" ) ; updateCredentials . failure ( "onCredentialsExpired did not return valid credentials." ) ; } } , function ( errorMsg ) { self . log ( "onCredentialsExpired callback indicated failure! (" + errorMsg + ")" , "error" ) ; updateCredentials . failure ( "onCredentialsExpired callback failed." ) ; } ) ; } else { self . log ( "onCredentialsExpired callback did not return a promise!" , "error" ) ; updateCredentials . failure ( "Unexpected return value for onCredentialsExpired." ) ; } return updateCredentials ; } } ; return qq . FineUploaderBasic . prototype . _createUploadHandler . call ( this , additionalOptions , "s3" ) ; }
Ensures the parent's upload handler creator passes any additional S3-specific options to the handler as well
as information required to instantiate the specific handler based on the current browser's capabilities.

@returns {qq.UploadHandlerController}
@private
Ensures the parent s upload handler creator passes any additional S3 - specific options to the handler as well as information required to instantiate the specific handler based on the current browser s capabilities .