vendor/assets/elfinder_OLD/js/elfinder.full.js
function(mime, target) {
		target = target || this.cwd().hash;
		var res   = true, // default is allow
			mimeChecker = this.option('uploadMime', target),
			allow,
			deny,
			check = function(checker) {
				var ret = false;
				if (typeof checker === 'string' && checker.toLowerCase() === 'all') {
					ret = true;
				} else if (Array.isArray(checker) && checker.length) {
					$.each(checker, function(i, v) {
						v = v.toLowerCase();
						if (v === 'all' || mime.indexOf(v) === 0) {
							ret = true;
							return false;
						}
					});
				}
				return ret;
			};
		if (mime && $.isPlainObject(mimeChecker)) {
			mime = mime.toLowerCase();
			allow = check(mimeChecker.allow);
			deny = check(mimeChecker.deny);
			if (mimeChecker.firstOrder === 'allow') {
				res = false; // default is deny
				if (! deny && allow === true) { // match only allow
					res = true;
				}
			} else {
				res = true; // default is allow
				if (deny === true && ! allow) { // match only deny
					res = false;
				}
			}
		}
		return res;
	}
function(mime, target) {
		target = target || this.cwd().hash;
		var res   = true, // default is allow
			mimeChecker = this.option('uploadMime', target),
			allow,
			deny,
			check = function(checker) {
				var ret = false;
				if (typeof checker === 'string' && checker.toLowerCase() === 'all') {
					ret = true;
				} else if (Array.isArray(checker) && checker.length) {
					$.each(checker, function(i, v) {
						v = v.toLowerCase();
						if (v === 'all' || mime.indexOf(v) === 0) {
							ret = true;
							return false;
						}
					});
				}
				return ret;
			};
		if (mime && $.isPlainObject(mimeChecker)) {
			mime = mime.toLowerCase();
			allow = check(mimeChecker.allow);
			deny = check(mimeChecker.deny);
			if (mimeChecker.firstOrder === 'allow') {
				res = false; // default is deny
				if (! deny && allow === true) { // match only allow
					res = true;
				}
			} else {
				res = true; // default is allow
				if (deny === true && ! allow) { // match only deny
					res = false;
				}
			}
		}
		return res;
	}
function ( mime , target ) { target = target || this . cwd ( ) . hash ; var res = true , // default is allow mimeChecker = this . option ( 'uploadMime' , target ) , allow , deny , check = function ( checker ) { var ret = false ; if ( typeof checker === 'string' && checker . toLowerCase ( ) === 'all' ) { ret = true ; } else if ( Array . isArray ( checker ) && checker . length ) { $ . each ( checker , function ( i , v ) { v = v . toLowerCase ( ) ; if ( v === 'all' || mime . indexOf ( v ) === 0 ) { ret = true ; return false ; } } ) ; } return ret ; } ; if ( mime && $ . isPlainObject ( mimeChecker ) ) { mime = mime . toLowerCase ( ) ; allow = check ( mimeChecker . allow ) ; deny = check ( mimeChecker . deny ) ; if ( mimeChecker . firstOrder === 'allow' ) { res = false ; // default is deny if ( ! deny && allow === true ) { // match only allow res = true ; } } else { res = true ; // default is allow if ( deny === true && ! allow ) { // match only deny res = false ; } } } return res ; }
Return boolean that uploadable MIME type into target folder

@param  String  mime    MIME type
@param  String  target  target folder hash
@return Bool
Return boolean that uploadable MIME type into target folder