Skip to content

Commit fd2c324

Browse files
authored
Merge pull request #143 from Gman98ish/urlencode-filenames
Now urlencodes in download and deleting attachments
2 parents b08476c + 93eaf42 commit fd2c324

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PSS/ReplyClient.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ public function upload($replyId, $name, $content)
8888
/**
8989
* Downloads an attachment
9090
*
91-
* @return \GuzzleHttp\Psr7\Stream
91+
* @return \UKFast\SDK\PSS\Entities\Download
9292
*/
9393
public function download($replyId, $name)
9494
{
95+
$name = urlencode($name);
9596
return new Download(
9697
$this->request('GET', "v1/replies/$replyId/attachments/$name")
9798
);
@@ -105,6 +106,7 @@ public function download($replyId, $name)
105106
*/
106107
public function deleteAttachment($replyId, $name)
107108
{
109+
$name = urlencode($name);
108110
$this->delete("v1/replies/$replyId/attachments/$name");
109111
}
110112

0 commit comments

Comments
 (0)