summaryrefslogtreecommitdiff
path: root/lib/aggiedit_web/live/post_live/form_component.html.heex
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-06 18:17:27 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-06 18:17:27 -0600
commited22eb20f9f320d5ded4951c16fbb867b6883ce1 (patch)
treea881af22341fe6f4fe51a120f3c1a2bbb47ca742 /lib/aggiedit_web/live/post_live/form_component.html.heex
parent61c2c9370a0e0139bdb9cab1de64723d60b2682c (diff)
downloadaggiedit-ed22eb20f9f320d5ded4951c16fbb867b6883ce1.tar.gz
aggiedit-ed22eb20f9f320d5ded4951c16fbb867b6883ce1.zip
Add uploads; next up - user authentication on post
Diffstat (limited to 'lib/aggiedit_web/live/post_live/form_component.html.heex')
-rw-r--r--lib/aggiedit_web/live/post_live/form_component.html.heex10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/aggiedit_web/live/post_live/form_component.html.heex b/lib/aggiedit_web/live/post_live/form_component.html.heex
index 682ec78..695a90a 100644
--- a/lib/aggiedit_web/live/post_live/form_component.html.heex
+++ b/lib/aggiedit_web/live/post_live/form_component.html.heex
@@ -16,6 +16,16 @@
<%= label f, :body %>
<%= textarea f, :body %>
<%= error_tag f, :body %>
+
+ <%= live_file_input @uploads.upload %>
+
+ <%= for upload <- @uploads.upload.entries do %>
+ <div class="row">
+ <div class="column">
+ <%= live_img_preview upload, height: 80 %>
+ </div>
+ </div>
+ <% end %>
<div>
<%= submit "Save", phx_disable_with: "Saving..." %>