Mass upload of file to records
This should be fairly simple to script using the Attachment api.  For docs, go to https://dmaster.demo.civicrm.org/civicrm/api#docs and select Attachment as the entity which has an example of using create with a custom field.