CC-4463: do we need getFileExtension()?
This commit is contained in:
parent
8b445486b1
commit
c310cecf40
|
@ -407,11 +407,12 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public function getFileExtension()
|
public function getFileExtension()
|
||||||
{
|
{
|
||||||
|
return "";
|
||||||
// TODO : what's the point of having this function? Can we not just use
|
// TODO : what's the point of having this function? Can we not just use
|
||||||
// the extension from the file_path column from cc_files?
|
// the extension from the file_path column from cc_files?
|
||||||
$mime = $this->_file->getDbMime();
|
$mime = $this->_file->getDbMime();
|
||||||
|
|
||||||
if ($mime == "audio/vorbis" || $mime == "application/ogg") {
|
if ($mime == "audio/ogg" || $mime == "application/ogg") {
|
||||||
return "ogg";
|
return "ogg";
|
||||||
} elseif ($mime == "audio/mp3" || $mime == "audio/mpeg") {
|
} elseif ($mime == "audio/mp3" || $mime == "audio/mpeg") {
|
||||||
return "mp3";
|
return "mp3";
|
||||||
|
@ -505,8 +506,6 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public function getRelativeFileUrl($baseUrl)
|
public function getRelativeFileUrl($baseUrl)
|
||||||
{
|
{
|
||||||
Logging::info("getting media!");
|
|
||||||
|
|
||||||
return $baseUrl."/api/get-media/file/".$this->getId().".".$this->getFileExtension();
|
return $baseUrl."/api/get-media/file/".$this->getId().".".$this->getFileExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue