diff --git a/app/Attachment.php b/app/Attachment.php index 30463c6a4..61773f52c 100644 --- a/app/Attachment.php +++ b/app/Attachment.php @@ -248,7 +248,13 @@ public static function typeNameToInt($type_name) */ public function url() { - return Storage::url($this->getStorageFilePath()).'?id='.$this->id.'&token='.$this->getToken(); + $file_url = Storage::url($this->getStorageFilePath()); + + // Fix percents. + // https://github.com/freescout-helpdesk/freescout/issues/3530 + $file_url = str_replace('%', '%25', $file_url); + + return $file_url.'?id='.$this->id.'&token='.$this->getToken(); } /**