Update Embedfiles.php

try that
This commit is contained in:
Ray 2023-03-13 09:10:34 -04:00
parent 5bcd0e14c7
commit 28d0c6954f

View file

@ -151,6 +151,10 @@ class Embedfiles extends Controller
if ($channel) {
$resolution = 1;
switch(result.filetype) {
case "image/jpeg":
case "image/png":
case "image/gif":
if ($_POST["filetype"] === 'image/jpeg') {
$ext = '.jpg';
} elseif ($_POST["filetype"] === 'image/png') {
@ -167,6 +171,11 @@ class Embedfiles extends Controller
. '[zmg width="100%" height="auto"' . $alt . ']'
. z_root() . '/photo/' . $resource . '-' . $resolution . $ext . '[/zmg][/zrl]';
break;
default:
return '';
}
$output .= "\n\n" . '[attachment]' . $_POST['hash'] . ',' . $_POST['revision'] . '[/attachment]' . "\n";
return $output;