System wont recognize special characters or spaces

I was having issues with the Files section in Dolphin changing my file names when I upload them and so when you download them their name has been changed.

I contacted my hosting company which is a certified Dolphin host and they said that the Dolphin File module doesn't recognized special characters or spaces. Is there a way we can get this fixed? It is very important that my file names remain the same since I have links in some of them that link back to each other and any kind of name change will break the links.

Here is what the my hosting company said:

 

We have uploaded a small .mp4 file to test with a different type of files that the ones you have already tested it with. The first time we uploaded the file it was named "small_bird" and when we attempted to downloaded it, the name was changed the "small-bird".

The second time the same file was uploaded, it was uploaded as "smallbird" and when we attempted the download the name remained the same. It seems that the module recognises only alphanumeric symbols and any special character or a space will cause the module to try and replace it.

Regrettably, this module behaviour and setup seem to be hard coded in the module system files. Given this, we would recommend contacting the Boonex developers so they can give their opinion on the module behaviour. 

Quote · 1 Dec 2015

I would suggest to make the following modification in 2 places in modules/boonex/files/classes/BxFilesModule.php:

    function actionGetFile ($sFileName)
    {
        $iFileId = (int)$sFileName;
        $aInfo = $this->_oDb->getFileInfo(array('fileId'=>(int)$iFileId), false, array('medID', 'medProfId', 'medExt', 'medDate', 'Type', 'medUri', 'medTitle'));
        if ($aInfo && $this->isAllowedDownload($aInfo)) {
            $sPathFull = $this->_oConfig->getHomePath() . 'data/files/' . $aInfo['medID'] . '_' . sha1($aInfo['medDate']);
            if (file_exists($sPathFull)) {
                header('Connection: close');
                header('Content-Type: ' . $aInfo['Type']);
                header('Content-Length: ' . filesize($sPathFull));
                header('Last-Modified: ' . gmdate('r', filemtime($sPathFull)));
                header('Content-Disposition: attachment; filename="' . $aInfo['medTitle'] . '.' . $aInfo['medExt'] . '";');
                readfile($sPathFull);
                $this->_oDb->updateDownloadsCount($sFileUri);
                $this->isAllowedDownload($aInfo, true);
                exit;
            } else {
                $this->_oTemplate->displayPageNotFound();
            }
        } elseif (!$aInfo) {
            $this->_oTemplate->displayPageNotFound();
        } else {
            $this->_oTemplate->displayAccessDenied();
        }
    }
Rules → http://www.boonex.com/terms
Quote · 7 Dec 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.