Delete recordings from FOP2 + permissions
-
Is it possible to have a little red X next to each recording on the recordings page so certain people can delete recordings with the GUI?
https://img.skitch.com/20120210-fyfyfa8ufa3ekehk1ffn4rxd5h.png
-
-
Hi Guys,
We would also like to have this option.
We look after about 10 different companies that use Fop2 and they have all asked for this feature to be able to delete either old recordings that are no longer needed or accidental recordings.
If we remove the files for them from the command line they still show up in the GUI but when you click on the file it says "ERROR: file not found" is the a way if you remove it from the command line to also remove it from the GUI?
Regards,
Kane -
If you want to remove them from the GUI you have to find the record in the fop2recordings mysql table and delete it from there. There is an easy fix for removing database entries (but not the file itself), you can edit the recordings.php file and change the line that says:
$grid->allow_delete(false);to
$grid->allow_delete(true);The file itself will remain on disk when you remove the database entry.
Best regards,
-
Hi,
I looked at the /usr/src/fop2/html/download.php file but i couldnt find that line?
We are using version 2.24
here is what is in our file:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
?php
define("MYAP", "FOP2");
define("TITLE", "Flash Operator Panel 2");
if(isset($_SERVER['PATH_INFO'])) {
define("SELF", substr($_SERVER['PHP_SELF'], 0, (strlen($_SERVER['PHP_SELF']) - @strlen($_SERVER['PATH_INFO']))));
} else {
define("SELF", $_SERVER['PHP_SELF']);
}// Session start
session_start();if(!isset($_REQUEST['file'])) {
die("No filename specified");
}list ($getid,$filename2) = preg_split("/!/",$_REQUEST['file'],2);
$filename2 = preg_replace("/../","",$filename2);
$filename2 = preg_replace("/%2e/","",$filename2);
$filename2 = preg_replace("//+/","/",$filename2);
$file_extension = strtolower(substr(strrchr($filename2,"."),1));// required for IE, otherwise Content-disposition is ignored
if(ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
}if(!isset($_SESSION[MYAP]['vpath'])) {
die("unavailable");
}if($_SESSION[MYAP]['vfile'] <> $filename2) {
die("unavailable");
}if(!stristr($_SESSION[MYAP]['vfile'],$_SESSION[MYAP]['vpath']) && !stristr($_SESSION[MYAP]['vfile'],'/var/spool/asterisk/monitor/fop2')) {
die("unavailable");
}$realid=md5($_SESSION[MYAP]['key']);
if($realid<>$getid) {
die("invalid id");
}if($file_extension<>"wav" && $file_extension<>"WAV" && $file_extension<>"gsm") {
die("Only wav or gsm allowed");
}if( $filename2 == "" ) {
echo "ERROR: download file NOT SPECIFIED.";
exit;
} elseif ( ! file_exists( $filename2 ) ) {
echo "ERROR: File not found.";
exit;
}header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // required for certain browsers
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename="".basename($filename2)."";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename2));
readfile("$filename2");
exit();
?>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login