Probably doing something silly here, but when querying the events API for a single event I'm getting returned a warning in the response.
Here's an example for https://<zoneminder_domain>/zm/api/events/141020.json :
Code: Select all
Warning (2): filesize(): stat failed for /var/cache/zoneminder/events///141020-video.mp4 [APP/Model/Event.php, line 139]
{ "event": { "Event": { "Id": "141020", "MonitorId": "1", "StorageId": "1", "Name": "Event- 141020", "Cause": "Linked", "StartTime": "2019-03-27 13:40:19", "EndTime": "2019-03-27 13:40:30", "Width": "1920", "Height": "1080", "Length": "11.39", "Frames": "112", "AlarmFrames": "65", "DefaultVideo": "141020-video.mp4", "SaveJPEGs": "0", "TotScore": "3250", "AvgScore": "50", "MaxScore": "50", "Archived": "0", "Videoed": "0", "Uploaded":
<snip>
More verbose output from the link in a browser:
Code: Select all
public function fileSize($event) {
$storage = $this->Storage->findById($event['StorageId']);
return filesize($storage['Storage']['Path'].'/'.$this->Relative_Path($event).'/'.$event['DefaultVideo']);
filesize - [internal], line ??
Event::fileSize() - APP/Model/Event.php, line 139
EventsController::view() - APP/Controller/EventsController.php, line 132
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 491
AppController::invokeAction() - APP/Plugin/Crud/Lib/CrudControllerTrait.php, line 31
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 107
Any ideas?
Thanks.