Fixed bad message when serving non-existing files
This commit is contained in:
parent
2a215ef51b
commit
8bd4ae27c2
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue