mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-20 20:13:17 +00:00
14 lines
455 B
JavaScript
Vendored
14 lines
455 B
JavaScript
Vendored
$(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);
|
|
}
|
|
});
|
|
});
|