feat: user avatar as public asset
This commit is contained in:
parent
23f12904cc
commit
07fff532f7
17 changed files with 172 additions and 21 deletions
|
|
@ -55,10 +55,9 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="picture">Profile picture</label>
|
||||
<!-- for now, no JPEG -->
|
||||
<label for="avatar">Profile picture</label>
|
||||
<input
|
||||
id="picture" name="picture"
|
||||
id="avatar" name="avatar"
|
||||
type="file"
|
||||
accept="image/gif, image/png, image/jpeg"
|
||||
class="form-control"
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@
|
|||
<a href="/me/details-form">Update details.</a>
|
||||
<a href="/me/authorizations">Manage authorizations.</a>
|
||||
|
||||
<p>
|
||||
{% if user.picture %}
|
||||
<img src="data:image/*;base64,{{ encode_b64str(user.picture) }}" style="width: 150px; height: 150px; object-fit: contain">
|
||||
{% if user.avatar_asset_id %}
|
||||
<div class="my-3">
|
||||
<img
|
||||
src="http://localhost:8085/api/user-assets/{{ user.avatar_asset_id }}"
|
||||
style="width: 150px; height: 150px; object-fit: contain">
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul>
|
||||
<li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue