You can put the file attachment in a repeating table and then have a button that adds a new row to the repeating table.
The code for how to add a row to a repeating table is on this site in multiple places depending on the code language you use.
We use this concept on a few forms.