From e86440799adbb5b83fb2cf6383d4d066388dc38d Mon Sep 17 00:00:00 2001 From: Ashwin Thanaraj <37061471+ashwin1111@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:34:24 +0530 Subject: [PATCH] Replace jpeg to jpg for attachment upload (#531) --- apps/quickbooks_online/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/quickbooks_online/utils.py b/apps/quickbooks_online/utils.py index 1bcef115..b445b9c7 100644 --- a/apps/quickbooks_online/utils.py +++ b/apps/quickbooks_online/utils.py @@ -1012,7 +1012,7 @@ def post_attachments(self, ref_id: str, ref_type: str, attachments: List[Dict]) for attachment in attachments: # Ignoring html attachments from chrome extension, QBO API will throw error if we upload a html file if attachment['content_type'] != 'text/html': - response = self.connection.attachments.post(ref_id=ref_id, ref_type=ref_type, content=attachment['download_url'], file_name=attachment['name']) + response = self.connection.attachments.post(ref_id=ref_id, ref_type=ref_type, content=attachment['download_url'], file_name=attachment['name'].replace('jpeg', 'jpg')) responses.append(response) return responses return []