File Upload

Drag-and-drop file upload built on Phoenix LiveView uploads.

Document Dropzone

Image Upload With Thumbnails

Set thumbnail to render image previews using Phoenix's live_img_preview/1 — perfect for photo galleries and avatars.

Image Upload

Single File

Use max_entries: 1 in allow_upload/3 for single-file uploads like avatars. Combined with thumbnail , it makes a clean profile photo picker.

Avatar Upload

Custom Dropzone Content

Override the default icon and label with the :drop_content slot. The dropzone keeps its drag-and-drop behavior — you just control what's shown inside.

Custom Content

Notes

  • Configure accepted types, max entries, and max size in allow_upload/3 before rendering the component.
  • Always wrap file_upload in a <form> with phx-change and phx-submit — the upload entries are processed via the form lifecycle.
  • Call consume_uploaded_entries/3 in your save handler to copy files to their final destination.
  • The cancel_event attr (default "cancel-upload" ) must be handled to remove entries — it receives upload and ref params for cancel_upload/3 .
  • Use the :entry slot when you need a fully custom preview row.