I've got a Bootstrap modal that I use to present a form through which I can create and edit an node on my site. This object has an uploaded file associated with it, so things work in the usual way: when I create the object, I get the "Browse..." field for selecting the file; when I edit the object, I get a little rendering of the file and a "Remove" button that is meant to let me get rid of the old file and pick a new one.
I haven't been able to get/figure out the Drupal ajax mechanism to work with my modal form, and, without it, clicking the Remove button refreshes the whole page, which blows my modal away and is clearly the wrong thing. So I wrote some jQuery code for the Remove button: when the button is clicked, it removes the file's little rendering and inserts the same sort of file input field as when a node is created. This works; the code I get on the page is the same as what's there when I'm creating a new node.