mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-02-03 10:25:52 +00:00
add svg images support, fix mime validation
This commit is contained in:
parent
e9d5137dfe
commit
84dcecf50b
@ -292,6 +292,8 @@ try {
|
|||||||
if ($hostImageBanned) {
|
if ($hostImageBanned) {
|
||||||
|
|
||||||
$hostImagesBanned += $db->updateHostImageTimeBanned($queueHostImage->hostImageId, time());
|
$hostImagesBanned += $db->updateHostImageTimeBanned($queueHostImage->hostImageId, time());
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert remote image data to base64 string
|
// Convert remote image data to base64 string
|
||||||
@ -319,7 +321,7 @@ try {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hostImageData = 'data:image/' . $hostImageExtension . ';base64,' . $hostImageBase64;
|
$hostImageData = 'data:image/' . str_replace(['svg'], ['svg+xml'], $hostImageExtension) . ';base64,' . $hostImageBase64;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -380,6 +382,8 @@ try {
|
|||||||
if ($hostPageBanned) {
|
if ($hostPageBanned) {
|
||||||
|
|
||||||
$hostPagesBanned += $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());
|
$hostPagesBanned += $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip page processing without returned data
|
// Skip page processing without returned data
|
||||||
|
@ -382,6 +382,8 @@ if (!empty($q)) {
|
|||||||
if ($hostImageBanned) {
|
if ($hostImageBanned) {
|
||||||
|
|
||||||
$hostImagesBanned += $db->updateHostImageTimeBanned($hostImage->hostImageId, time());
|
$hostImagesBanned += $db->updateHostImageTimeBanned($hostImage->hostImageId, time());
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip image processing without returned content
|
// Skip image processing without returned content
|
||||||
@ -407,7 +409,7 @@ if (!empty($q)) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hostImageURLencoded = 'data:image/' . $hostImageExtension . ';base64,' . $hostImageBase64;
|
$hostImageURLencoded = 'data:image/' . str_replace(['svg'], ['svg+xml'], $hostImageExtension) . ';base64,' . $hostImageBase64;
|
||||||
|
|
||||||
// Save image content on data settings enabled
|
// Save image content on data settings enabled
|
||||||
$db->updateHostImage($hostImage->hostImageId,
|
$db->updateHostImage($hostImage->hostImageId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user