fileChanged  (event) {
		var self = this;

		if (window.FileReader) {
			var files = event.target.files;
			_.each(files, function (f) {
				if (!_.contains(SUPPORTED_TYPES, f.type)) {
					self.removeImage();
					alert('Unsupported file type. Supported formats are: GIF, PNG, JPG, BMP, ICO, PDF, TIFF, EPS, PSD, SVG');
					return false;
				}

				var fileReader = new FileReader();
				fileReader.onload = function (e) {
					if (!self.isMounted()) return;
					self.setState({
						localSource: e.target.result,
						origin: 'local'
					});
				};
				fileReader.readAsDataURL(f);
			});
		} else {
			this.setState({
				origin: 'local'
			});
		}
	}
/**
	 * Check support for input files on input change.
	 */
Check support for input files on input change.
Check support for input files on input change .
fileChanged  (event) {
		var self = this;
		if (window.FileReader) {
			var files = event.target.files;
			_.each(files, function (f) {
				if (!_.contains(SUPPORTED_TYPES, f.type)) {
					self.removeImage();
					alert('Unsupported file type. Supported formats are: GIF, PNG, JPG, BMP, ICO, PDF, TIFF, EPS, PSD, SVG');
					return false;
				}
				var fileReader = new FileReader();
				fileReader.onload = function (e) {
					if (!self.isMounted()) return;
					self.setState({
						localSource: e.target.result,
						origin: 'local'
					});
				};
				fileReader.readAsDataURL(f);
			});
		} else {
			this.setState({
				origin: 'local'
			});
		}
	}
fileChanged ( event ) { var self = this ; if ( window . FileReader ) { var files = event . target . files ; _ . each ( files , function ( f ) { if ( ! _ . contains ( SUPPORTED_TYPES , f . type ) ) { self . removeImage ( ) ; alert ( 'Unsupported file type. Supported formats are: GIF, PNG, JPG, BMP, ICO, PDF, TIFF, EPS, PSD, SVG' ) ; return false ; } var fileReader = new FileReader ( ) ; fileReader . onload = function ( e ) { if ( ! self . isMounted ( ) ) return ; self . setState ( { localSource : e . target . result , origin : 'local' } ) ; } ; fileReader . readAsDataURL ( f ) ; } ) ; } else { this . setState ( { origin : 'local' } ) ; } }
Check support for input files on input change.
Check support for input files on input change .