mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-06-01 15:23:10 +00:00
Add profile picture uploading
This commit is contained in:
parent
361d76f530
commit
fdac4dc402
8 changed files with 73 additions and 22 deletions
|
@ -4,12 +4,16 @@
|
|||
{% block content %}
|
||||
<div class="block">
|
||||
<h2 style="margin-bottom: 1rem;">Profile Settings</h2>
|
||||
<form action="{{ url_for('account.settings') }}" method="POST">
|
||||
<form action="{{ url_for('account.settings') }}" method="POST" enctype="multipart/form-data">
|
||||
<div class="profile-settings">
|
||||
<div class="picture">
|
||||
<img src="{{ url_for('static', filename='images/error/2.jpg') }}" alt="Profile picture">
|
||||
{% if current_user.picture %}
|
||||
<img src="{{ url_for('api.upload_dir', filename=current_user.picture) }}" alt="Profile picture">
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='images/pfp.png') }}" alt="Profile picture">
|
||||
{% endif %}
|
||||
<label for="profile-picture">Profile Picture</label>
|
||||
<input type="file" name="picture" id="profile-picture">
|
||||
<input type="file" name="file" id="profile-picture">
|
||||
</div>
|
||||
<div class="other">
|
||||
{{ text(id="profile-username", name="username", value=current_user.username) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue