Fixed bad message when serving non-existing files

This commit is contained in:
Marcin Kurczewski 2014-11-19 19:43:32 +01:00
parent 2a215ef51b
commit 8bd4ae27c2

View file

@ -14,6 +14,9 @@ class NetworkingService
public function serveFile($fullPath, $customFileName = null)
{
if (!file_exists($fullPath))
throw new \Exception('File "' . $fullPath . '" does not exist.');
$daysToLive = 7;
$secondsToLive = $daysToLive * 24 * 60 * 60;
$lastModified = filemtime($fullPath);