Hi i have the image selector control for selecting the image after that uploading it to the server. And i have to preview the selected image in the same page which is working fine in all browser but not in safari (my version 5.1.7). here is my code. please help to resolve this thanks in advance.
jQuery('#image').on('change', function ()
{
ext = jQuery(this).val().split('.').pop().toLowerCase();
if (jQuery.inArray(ext, ['gif', 'png', 'jpg', 'jpeg']) == -1) {
resetFormElement(jQuery(this));
window.alert('Not an image!');
}
else
{
file = jQuery('#image').prop("files")[0];
blobURL = window.URL.createObjectURL(file);
jQuery('#image_preview img').attr('src', blobURL);
jQuery('#image_preview').slideDown();
jQuery(this).slideUp();
}
});