Restoring uploaded file records
If you say the file record is correctly present in civicrm_file and civicrm_entity_file table, then only thing which is missing seems to be the entry for it in custom value table. To verify this yourself -


Check the custom value table name mentioned in civicrm_entity_file (entity_table column).
Open the above custom table and make sure it contains the mapping of civicrm_file id and entity_id(contact id)