Add file attachements to projects
This commit is contained in:
@@ -188,30 +188,6 @@ abstract class File extends Base
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the image mimetype based on the file extension
|
||||
*
|
||||
* @access public
|
||||
* @param $filename
|
||||
* @return string
|
||||
*/
|
||||
public function getImageMimeType($filename)
|
||||
{
|
||||
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
|
||||
switch ($extension) {
|
||||
case 'jpeg':
|
||||
case 'jpg':
|
||||
return 'image/jpeg';
|
||||
case 'png':
|
||||
return 'image/png';
|
||||
case 'gif':
|
||||
return 'image/gif';
|
||||
default:
|
||||
return 'image/jpeg';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the path for a thumbnails
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user