function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
var noOfImgs = parseInt( input.files.length );
if ( noOfImgs > 6 ){
alert( 'You can only upload a maximum of 6 files' );
}
else {
reader.onload = function (e) {
$('#logoImg').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
else {
alert ( 'Sorry, your browser does not support Files API.' );
}
}