Skip to content
Snippets Groups Projects
Commit daa4ae12 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #15043 TIME 0:30 Display default thumbnail if doc thumbnail does not exists

parent 117da515
No related branches found
No related tags found
No related merge requests found
......@@ -712,9 +712,10 @@ class ResController extends ResourceControlController
}
}
$fileContent = file_get_contents($pathToThumbnail);
$fileContent = @file_get_contents($pathToThumbnail);
if ($fileContent === false) {
return $response->withStatus(404)->withJson(['errors' => 'Thumbnail not found on docserver']);
$pathToThumbnail = 'dist/assets/noThumbnail.png';
$fileContent = @file_get_contents($pathToThumbnail);
}
$finfo = new \finfo(FILEINFO_MIME_TYPE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment