src/whatsprot.class.php
protected function processTempMediaFile($storeURLmedia)
    {
        if (!isset($this->mediaFileInfo['url'])) {
            return false;
        }

        if ($storeURLmedia && is_file($this->mediaFileInfo['filepath'])) {
            rename($this->mediaFileInfo['filepath'], $this->mediaFileInfo['filepath'].'.'.$this->mediaFileInfo['fileextension']);
        } elseif (is_file($this->mediaFileInfo['filepath'])) {
            unlink($this->mediaFileInfo['filepath']);
        }
    }
protected function processTempMediaFile($storeURLmedia)
    {
        if (!isset($this->mediaFileInfo['url'])) {
            return false;
        }

        if ($storeURLmedia && is_file($this->mediaFileInfo['filepath'])) {
            rename($this->mediaFileInfo['filepath'], $this->mediaFileInfo['filepath'].'.'.$this->mediaFileInfo['fileextension']);
        } elseif (is_file($this->mediaFileInfo['filepath'])) {
            unlink($this->mediaFileInfo['filepath']);
        }
    }
protected function processTempMediaFile ( $ storeURLmedia ) { if ( ! isset ( $ this -> mediaFileInfo [ 'url' ] ) ) { return false ; } if ( $ storeURLmedia && is_file ( $ this -> mediaFileInfo [ 'filepath' ] ) ) { rename ( $ this -> mediaFileInfo [ 'filepath' ] , $ this -> mediaFileInfo [ 'filepath' ] . '.' . $ this -> mediaFileInfo [ 'fileextension' ] ) ; } elseif ( is_file ( $ this -> mediaFileInfo [ 'filepath' ] ) ) { unlink ( $ this -> mediaFileInfo [ 'filepath' ] ) ; } }
If the media file was originally from a URL, this function either deletes it
or renames it depending on the user option.

@param bool $storeURLmedia Save or delete the media file from local server
If the media file was originally from a URL this function either deletes it or renames it depending on the user option .