From 74e3a423fdea0c85d1e1e6ee9bc8bceff710df67 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 2 Aug 2019 12:35:00 +0200 Subject: [PATCH] Fix document list for products in API --- htdocs/api/class/api_documents.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index f4a7084b336..48d6bf5b903 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -368,7 +368,7 @@ class Documents extends DolibarrApi throw new RestException(404, 'Product not found'); } - $upload_dir = $conf->product->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'product'); + $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); } elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') {