Add file attachements to projects

This commit is contained in:
Frederic Guillot
2016-02-16 21:12:43 -05:00
parent 5bbc903dca
commit 8936792f6f
20 changed files with 449 additions and 194 deletions

View File

@@ -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
*