mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
5064afecc1
commit
fc39e328bb
1 changed files with 8 additions and 2 deletions
|
@ -85,8 +85,14 @@ if (empty($objo) || ($objo->onlyAdminCanBulkEmbed && !User::isAdmin())) {
|
|||
$poster = Video::getPathToFile("{$paths['filename']}.jpg");
|
||||
$thumbs = $value['thumbs'];
|
||||
if (!empty($thumbs)) {
|
||||
$bytes = file_put_contents($poster, url_get_contents($thumbs));
|
||||
_error_log("thumbs={$thumbs} poster=$poster bytes=$bytes ");
|
||||
$contentThumbs = url_get_contents($thumbs);
|
||||
if (!empty($contentThumbs)) {
|
||||
make_path($poster);
|
||||
$bytes = file_put_contents($poster, $contentThumbs);
|
||||
_error_log("thumbs={$thumbs} poster=$poster bytes=$bytes strlen=".strlen($contentThumbs));
|
||||
} else {
|
||||
_error_log("ERROR thumbs={$thumbs} poster=$poster");
|
||||
}
|
||||
} else {
|
||||
_error_log("ERROR thumbs={$thumbs} poster=$poster");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue