Phoenix.LiveView.cancel_upload
You're seeing just the function
cancel_upload
, go back to Phoenix.LiveView module for more information.
Cancels an upload for the given entry.
Examples
<%= for entry <- @uploads.avatar.entries do %>
...
<button phx-click="cancel-upload" phx-value-ref="<%= entry.ref %>">cancel</button>
<% end %>
def handle_event("cancel-upload", %{"ref" => ref}, socket) do
{:noreply, cancel_upload(socket, :avatar, ref)}
end