diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 48df30067a1..74e846d8b47 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -943,7 +943,7 @@ class Documents extends DolibarrApi // Move the temporary file at its final emplacement $result = dol_move($destfiletmp, $dest_file, '0', $overwriteifexists, 1, 1, $moreinfo); if (!$result) { - throw new RestException(500, "Failed to move file into '".$destfile."'"); + throw new RestException(500, "Failed to move file into '".$dest_file."'"); } return dol_basename($destfile);