mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
try abc files
This commit is contained in:
parent
a2cd3a5bdb
commit
e4854a30f9
2 changed files with 14 additions and 0 deletions
|
@ -197,6 +197,16 @@ class Embedfiles extends Controller
|
|||
logger('unable to read svg data file: '.'store/'. $channel['channel_address'] .'/'. $_POST['os_path']);
|
||||
}
|
||||
break;
|
||||
case "text/vnd.abc":
|
||||
if (Addon::is_installed('abc')) {
|
||||
$x = @file_get_contents('store/'. $channel['channel_address'] .'/'. $_POST['os_path']);
|
||||
if ($x) {
|
||||
$output .= "\n\n" . '[abc]' . $x . '[/abc]';
|
||||
} else {
|
||||
logger('unable to read ABC data file: ' . 'store/' . $channel['channel_address'] . '/' . $_POST['os_path']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -810,6 +810,10 @@ let postSaveTimer = null;
|
|||
let sendsvg_id = `embedFiles_${result.id}`;
|
||||
$( document ).ready(function() { document.getElementById(sendsvg_id).addEventListener("click", function() { setEmbedFiles2(result); }); });
|
||||
return `<li id = "${sendsvg_id}" class="border rounded my-1 p-2" data-bs-dismiss="modal" ><h4>${result.filename}</h4><img src="/images/mp3.png" class="img-fluid my-2" ></li>`;
|
||||
case "text/vnd.abc":
|
||||
let sendabc_id = `embedFiles_${result.id}`;
|
||||
$( document ).ready(function() { document.getElementById(sendabc_id).addEventListener("click", function() { setEmbedFiles2(result); }); });
|
||||
return `<li id = "${sendabc_id}" class="border rounded my-1 p-2" data-bs-dismiss="modal" ><h4>${result.filename}</h4><img src="/images/mp3.png" class="img-fluid my-2" ></li>`;
|
||||
//case "text/html":
|
||||
//case "text/vnd.abc":
|
||||
{{* let sendabc = `[abc]/cloud/${address}/${result.display_path}[/abc]`;
|
||||
|
|
Loading…
Reference in a new issue