From 77ce90a986d85eaabd7cf230d8c604cb4f9a77c4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 30 Aug 2022 15:00:36 -0400 Subject: [PATCH 1/3] DX-2809 fixed upload media content Type --- tests/ApiTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 0859585..6638102 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -62,9 +62,10 @@ public function testUploadDownloadMedia() { //constants $mediaId = "text-media-id-" . uniqid(); $content = "Hello world"; + $contentType = 'text/plain', //media upload - $this->bandwidthClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content); + $this->bandwidthClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content, $contentType; //media download $downloadedContent = $this->bandwidthClient->getMessaging()->getClient()->getMedia(getenv("BW_ACCOUNT_ID"), $mediaId)->getResult(); From d3e25fa9e0906df45c489f65b0fbe35640259df4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 30 Aug 2022 15:36:42 -0400 Subject: [PATCH 2/3] Update ApiTest.php --- tests/ApiTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 6638102..1b294da 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -65,7 +65,7 @@ public function testUploadDownloadMedia() { $contentType = 'text/plain', //media upload - $this->bandwidthClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content, $contentType; + $this->bandwidthClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content, $contentType); //media download $downloadedContent = $this->bandwidthClient->getMessaging()->getClient()->getMedia(getenv("BW_ACCOUNT_ID"), $mediaId)->getResult(); From 9119be3848576b9d44c0a7754d1887714d9a81c4 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 30 Aug 2022 15:50:10 -0400 Subject: [PATCH 3/3] Update ApiTest.php --- tests/ApiTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 1b294da..87e317b 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -62,7 +62,7 @@ public function testUploadDownloadMedia() { //constants $mediaId = "text-media-id-" . uniqid(); $content = "Hello world"; - $contentType = 'text/plain', + $contentType = 'text/plain'; //media upload $this->bandwidthClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content, $contentType);