client/js/uploader.basic.api.js
function() {
            if (this._options.camera.ios && qq.ios()) {
                var acceptIosCamera = "image/*;capture=camera",
                    button = this._options.camera.button,
                    buttonId = button ? this._getButtonId(button) : this._defaultButtonId,
                    optionRoot = this._options;

                // If we are not targeting the default button, it is an "extra" button
                if (buttonId && buttonId !== this._defaultButtonId) {
                    optionRoot = this._extraButtonSpecs[buttonId];
                }

                // Camera access won't work in iOS if the `multiple` attribute is present on the file input
                optionRoot.multiple = false;

                // update the options
                if (optionRoot.validation.acceptFiles === null) {
                    optionRoot.validation.acceptFiles = acceptIosCamera;
                }
                else {
                    optionRoot.validation.acceptFiles += "," + acceptIosCamera;
                }

                // update the already-created button
                qq.each(this._buttons, function(idx, button) {
                    if (button.getButtonId() === buttonId) {
                        button.setMultiple(optionRoot.multiple);
                        button.setAcceptFiles(optionRoot.acceptFiles);

                        return false;
                    }
                });
            }
        }
function() {
            if (this._options.camera.ios && qq.ios()) {
                var acceptIosCamera = "image/*;capture=camera",
                    button = this._options.camera.button,
                    buttonId = button ? this._getButtonId(button) : this._defaultButtonId,
                    optionRoot = this._options;

                // If we are not targeting the default button, it is an "extra" button
                if (buttonId && buttonId !== this._defaultButtonId) {
                    optionRoot = this._extraButtonSpecs[buttonId];
                }

                // Camera access won't work in iOS if the `multiple` attribute is present on the file input
                optionRoot.multiple = false;

                // update the options
                if (optionRoot.validation.acceptFiles === null) {
                    optionRoot.validation.acceptFiles = acceptIosCamera;
                }
                else {
                    optionRoot.validation.acceptFiles += "," + acceptIosCamera;
                }

                // update the already-created button
                qq.each(this._buttons, function(idx, button) {
                    if (button.getButtonId() === buttonId) {
                        button.setMultiple(optionRoot.multiple);
                        button.setAcceptFiles(optionRoot.acceptFiles);

                        return false;
                    }
                });
            }
        }
function ( ) { if ( this . _options . camera . ios && qq . ios ( ) ) { var acceptIosCamera = "image/*;capture=camera" , button = this . _options . camera . button , buttonId = button ? this . _getButtonId ( button ) : this . _defaultButtonId , optionRoot = this . _options ; // If we are not targeting the default button, it is an "extra" button if ( buttonId && buttonId !== this . _defaultButtonId ) { optionRoot = this . _extraButtonSpecs [ buttonId ] ; } // Camera access won't work in iOS if the `multiple` attribute is present on the file input optionRoot . multiple = false ; // update the options if ( optionRoot . validation . acceptFiles === null ) { optionRoot . validation . acceptFiles = acceptIosCamera ; } else { optionRoot . validation . acceptFiles += "," + acceptIosCamera ; } // update the already-created button qq . each ( this . _buttons , function ( idx , button ) { if ( button . getButtonId ( ) === buttonId ) { button . setMultiple ( optionRoot . multiple ) ; button . setAcceptFiles ( optionRoot . acceptFiles ) ; return false ; } } ) ; } }
Allows camera access on either the default or an extra button for iOS devices.
Allows camera access on either the default or an extra button for iOS devices .