mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:15:12 +00:00
Update Embedfiles.php
try that
This commit is contained in:
parent
5bcd0e14c7
commit
28d0c6954f
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue