Id of live_file_input change on received pubsub update event

I use live_file_input in a component. When first file finishes / document is inserted in db, parent LV gets an event trough pubsub and signals a send_update to a component.

On update live_file_input gets a different id, so the second file is not uploaded properly anymore. If I disable send_update, it works fine.
I saw that there is an option to ignore updates: data-phx-update=“ignore”
but the instruction is not followed.

This worked previous LV versions (0.15.7)


Moving initialisation of live_file_input from update to mount solved the issue.

1 Like