show image on view product photos page, setEntityClass defaulting to all plugin entities

This commit is contained in:
2025-09-01 00:46:18 -07:00
parent 155095c25c
commit 8cf8d7cfa0
9 changed files with 40 additions and 1 deletions

View File

@@ -169,6 +169,8 @@ class ProductPhotosController extends AppController
$fullPath = Configure::readOrFail('CakeProducts.photos.directory') . $productPhoto->photo_dir . DS . $productPhoto->photo_filename;
return $this->response->withFile($fullPath);
return $this->response->withFile($fullPath, [
'download' => $this->request->getQuery('download', false) === '1'
]);
}
}