Store avatars as binary instead of base64
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-24 15:56:34 +03:00
parent 6d7d722c5d
commit 9e2210c45b
5 changed files with 35 additions and 24 deletions

View File

@@ -20,7 +20,7 @@
</button>
</p>
<p class="text-sm text-gray-500">
Your user address for Chat and Lightning Network.
Your account's address on the Internet
</p>
</div>
<%= form_for(@user, url: setting_path(:profile), html: { :method => :put }) do |f| %>
@@ -40,9 +40,10 @@
Default profile picture
</p>
<div class="flex items-center gap-6">
<% if current_user.avatar.present? %>
<% unless current_user.avatar.nil? %>
<p class="flex-none">
<%= image_tag "data:image/jpeg;base64,#{current_user.avatar}", class: "h-24 w-24 rounded-lg" %>
<%= image_tag "data:image/jpeg;base64,#{current_user.avatar_base64}",
class: "h-24 w-24 rounded-lg" %>
</p>
<% end %>
<div class="grow">