def record_file_factory(self):
        """Load default record file factory."""
        try:
            get_distribution('invenio-records-files')
            from invenio_records_files.utils import record_file_factory
            default = record_file_factory
        except DistributionNotFound:
            def default(pid, record, filename):
                return None

        return load_or_import_from_config(
            'PREVIEWER_RECORD_FILE_FACOTRY',
            app=self.app,
            default=default,
        )
Load default record file factory.