mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
455 B
JavaScript
15 lines
455 B
JavaScript
$(document).ready(function () {
|
|
$('#avatarInput').on('change', function(e) {
|
|
var file = document.getElementById('avatarInput').files[0];
|
|
var reader = new FileReader();
|
|
|
|
reader.addEventListener("load", function() {
|
|
$('#previewAvatar').html('<img src="' + reader.result + '" class="rounded-circle box-shadow" />');
|
|
}, false);
|
|
|
|
if (file) {
|
|
reader.readAsDataURL(file);
|
|
}
|
|
});
|
|
});
|