Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Feedback
  3. Delete recordings from FOP2 + permissions

Delete recordings from FOP2 + permissions

Scheduled Pinned Locked Moved Feedback
7 Posts 3 Posters 161 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    E
    Elijah Lynn
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      It would be possible, but also a potential security risk. Not sure if this is a feature I would like to implement. And it will only work on local file systems.

      1 Reply Last reply
      0
      • R
        R
        rookie01
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • N
          N
          nicolas
          wrote on last edited by
          #4

          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,

          1 Reply Last reply
          0
          • R
            R
            rookie01
            wrote on last edited by
            #5

            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();
            ?>
            ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

            1 Reply Last reply
            0
            • N
              N
              nicolas
              wrote on last edited by
              #6

              You have to edit /var/www/html/fop2/recordings.php

              (not download.php)

              1 Reply Last reply
              0
              • R
                R
                rookie01
                wrote on last edited by
                #7

                I found the file and it worked, Thanks for your help

                1 Reply Last reply
                0

                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
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                Powered by NodeBB Contributors
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups