mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-24 13:34:25 +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) {
|
||||
|
||||
$hostImagesBanned += $db->updateHostImageTimeBanned($queueHostImage->hostImageId, time());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Convert remote image data to base64 string
|
||||
@ -319,7 +321,7 @@ try {
|
||||
continue;
|
||||
}
|
||||
|
||||
$hostImageData = 'data:image/' . $hostImageExtension . ';base64,' . $hostImageBase64;
|
||||
$hostImageData = 'data:image/' . str_replace(['svg'], ['svg+xml'], $hostImageExtension) . ';base64,' . $hostImageBase64;
|
||||
|
||||
} else {
|
||||
|
||||
@ -380,6 +382,8 @@ try {
|
||||
if ($hostPageBanned) {
|
||||
|
||||
$hostPagesBanned += $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip page processing without returned data
|
||||
|
@ -382,6 +382,8 @@ if (!empty($q)) {
|
||||
if ($hostImageBanned) {
|
||||
|
||||
$hostImagesBanned += $db->updateHostImageTimeBanned($hostImage->hostImageId, time());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip image processing without returned content
|
||||
@ -407,7 +409,7 @@ if (!empty($q)) {
|
||||
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
|
||||
$db->updateHostImage($hostImage->hostImageId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user