Created
September 11, 2013 01:16
-
-
Save tayfunerbilen/6518165 to your computer and use it in GitHub Desktop.
FileReader example #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('input[name=fotograf]').change(function(e){ | |
if (window.File && window.FileReader && window.FileList && window.Blob) { | |
var fotograf = e.target.files[0]; | |
var reader = new FileReader(); | |
reader.readAsDataURL(fotograf); | |
reader.onload = function(evt){ | |
$('#result').attr('src', evt.target.result); | |
} | |
} else { | |
alert('Tarayıcınızın önizleme desteği bulunmuyor.'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment