def _upload_file_to_filesystem(
        self, filepath, upload_details, import_record_id, source_type
    ):
        """
        Implements uploading to SEED's filesystem. Used by
        upload_file if SEED in configured for local file storage.

        Args:
            filepath: full path to file
            upload_details: Results from 'get_upload_details' endpoint;
                contains details about where to send file and how.
            import_record_id: What ImportRecord to associate file with.
            source_type: Type of data in file (Assessed Raw, Portfolio Raw)

        Returns:
            {"import_file_id": 54,
             "success": true,
             "filename": "DataforSEED_dos15.csv"}
        """
        filename = os.path.basename(filepath)
        upload_url = (self.base_url, upload_details['upload_path']) % "%s%s"
        params = {
            'qqfile': filename,
            'import_record': import_record_id,
            'source_type': source_type
        }
        headers = {'authorization': self.authorization}
        return requests.post(upload_url,
                             params=params,
                             files={'filename': open(filepath, 'rb')},
                             headers=headers)
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/utils/api_client.py/APIClient._upload_file_to_filesystem/swapped operands of `%`