src/Controller/FeedbackController.php
public function viewimage($file) {
		$savepath = Configure::read('Feedback.configuration.Filesystem.location');

		if (!file_exists($savepath . $file)) {
			 throw new NotFoundException('Could not find that file');
		}

		$feedbackobject = unserialize(file_get_contents($savepath . $file));

		if (!isset($feedbackobject['screenshot'])) {
			throw new NotFoundException('No screenshot found');
		}

		$this->set('screenshot', $feedbackobject['screenshot']);

		$this->viewBuilder()->setLayout('ajax');
	}
public function viewimage($file) {
		$savepath = Configure::read('Feedback.configuration.Filesystem.location');

		if (!file_exists($savepath . $file)) {
			 throw new NotFoundException('Could not find that file');
		}

		$feedbackobject = unserialize(file_get_contents($savepath . $file));

		if (!isset($feedbackobject['screenshot'])) {
			throw new NotFoundException('No screenshot found');
		}

		$this->set('screenshot', $feedbackobject['screenshot']);

		$this->viewBuilder()->setLayout('ajax');
	}
public function viewimage ( $ file ) { $ savepath = Configure :: read ( 'Feedback.configuration.Filesystem.location' ) ; if ( ! file_exists ( $ savepath . $ file ) ) { throw new NotFoundException ( 'Could not find that file' ) ; } $ feedbackobject = unserialize ( file_get_contents ( $ savepath . $ file ) ) ; if ( ! isset ( $ feedbackobject [ 'screenshot' ] ) ) { throw new NotFoundException ( 'No screenshot found' ) ; } $ this -> set ( 'screenshot' , $ feedbackobject [ 'screenshot' ] ) ; $ this -> viewBuilder ( ) -> setLayout ( 'ajax' ) ; }
Temp function to view captured image from index page

@param string $file
@return \Cake\Http\Response|null
Temp function to view captured image from index page