This commit is contained in:
2023-10-22 14:51:47 +03:00
parent 5471696d62
commit ac2de4ddcc
2 changed files with 4 additions and 2 deletions

View File

@@ -307,7 +307,7 @@ async function upload_photo_f_profile (el,files) {
processData: false,
contentType: false,
// enctype: 'json',
data: JSON.stringify(data),
data: data,
success: function(data){
middleWareJS()

View File

@@ -3,7 +3,9 @@
<div class="block_inf_profile">
<div class="f-l width-50">
<div class="upload_photo_container">
<img class="avatar_user_profile" src="{% static "img/svg/User.svg" %}">
<img class="avatar_user_profile" {% if user.user_profile.avatar %}
src="{{ user.user_profile.avatar.url }}"
{% else %}src="{% static "img/svg/User.svg" %}"{% endif %} >
<input type="file" onchange="upload_photo_f_profile(this)" class="btn_f_upload_photo" id="id_btn_f_upload_photo">
<label class="upload_photo_label" for="id_btn_f_upload_photo">Загрузить фото</label>
</div>