show image on view product photos page, setEntityClass defaulting to all plugin entities
This commit is contained in:
@@ -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'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user