reader.onloadend = function() {
$('#upload').val(DataURIToBlob(reader.result));
$('#form_avatar').submit();
}
Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.