If the selected List view has more than 1999 records, the files get attached to the first 1999 records. You can define your list view accordingly.
PS: View Mass File Upload, Salesforce file upload app, on Salesforce AppExchange:
https://appexchange.salesforce.com/appxListingDetail?listingId=82cf236b-1ee8-4ea7-aebf-fd0c89fb93bd