diff --git a/src/Service/Documents.php b/src/Service/Documents.php index 5474fda..5718ee7 100644 --- a/src/Service/Documents.php +++ b/src/Service/Documents.php @@ -62,7 +62,7 @@ public function AddToDocumentLibrary(string $filePath, string $caseId, string $f $fileName = preg_replace('@[<>:"/\\\\|?*]@', '_', $fileName); // Normalize white space. - $fileName = preg_replace('/[[:space:]]/', ' ', $fileName); + $fileName = preg_replace('/[[:space:]]/', ' ', trim($fileName)); $result = $this->getData( 'POST',