Skip to content

Commit

Permalink
Merge pull request #57 from webgriffe/mmenozzi-patch-2
Browse files Browse the repository at this point in the history
Fix download file to not urlencode media code
  • Loading branch information
mmenozzi authored Mar 10, 2021
2 parents d847f12 + 833c4b2 commit ac4b59f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function findAttribute(string $code): ?array
*/
public function downloadFile(string $code): \SplFileInfo
{
$endpoint = sprintf('/api/rest/v1/media-files/%s/download', urlencode($code));
$endpoint = sprintf('/api/rest/v1/media-files/%s/download', $code);
Assert::string($this->accessToken);
$headers = ['Authorization' => sprintf('Bearer %s', $this->accessToken)];
$request = new Request('GET', $this->baseUrl . $endpoint, $headers);
Expand Down

0 comments on commit ac4b59f

Please sign in to comment.