diff --git a/declarationtvaindex.php b/declarationtvaindex.php index 088a0a9..cfb6ca4 100644 --- a/declarationtvaindex.php +++ b/declarationtvaindex.php @@ -155,8 +155,7 @@ if (empty($declarations)) { if ($pdf_path) { // Create a download link $relative_path = str_replace(DOL_DATA_ROOT, '', $pdf_path); - // Remove the extra /documents from the path - $relative_path = str_replace('/documents/documents/', '/documents/', $relative_path); + // The file is saved with /documents/documents/ so we need to keep that in the URL $download_url = DOL_URL_ROOT . $relative_path; print ''; print ' PDF';