How to reuse/reset live upload?

This same issue has come up in the past. It seems as though there was a deliberate design decision not allow resetting uploads. The reasoning isn’t clear (to me at least).

“I also tried a few other things and ultimately gave up and kinda redesigned my whole page.” “The problem was that it took me three days to get there.”

I’m kinda at that point. Take the simple use case of a form that includes a live_file_input. It can be set, reset, or blanked out. For the case of blanking it out, I need to reset the model field that holds the file reference to nil. The user should still be able to continue filling out the form. They should also be able to choose to add a file again. I’ve yet to find anything to make that work because I can’t reset the upload.

I’ve also got a has_many “lines” in the form. Each line can have one file. The parent live view is responsible for defining the uploads and passing them into the stateful child component. The upload is named to include a value for a virtual attribute that allows me to identify which line it is. So in that case, preserving the upload name is critical, or I don’t know which line the file is for. I should be able to choose a file, blank out the file, or choose a different file on update. The “blank out” case similarly seems to require that upload reset.

Can either of these use cases be handled with the live file uploader? Would it make more sense to just do it with JS? Is there a breakdown of intended uses case and known limitations for live file uploader vis a vis these common use cases?

Thanks!