Skip to content
Snippets Groups Projects
Commit 6c187f07 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#93504_binum_pdf_open' into 'hotline'

Hotline#93504 binum pdf open

See merge request !3204
parents 6fe74a02 426129c8
Branches
Tags
5 merge requests!3297WIP: Master,!3220Master,!3216WIP: Koha pagination le retour,!3212Hotline,!3204Hotline#93504 binum pdf open
Pipeline #8061 passed with stage
in 38 minutes and 14 seconds
- ticket #93504 : Bibliothèque numérique : pouvoir ouvrir/télécharger des images avec l'extension JPG
\ No newline at end of file
......@@ -210,6 +210,7 @@ class Class_File_Mime {
*/
public static function getType($ext)
{
$ext = strtolower($ext);
if (isset(self::$extToTypes[$ext])) {
return self::$extToTypes[$ext];
}
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class MimeTest extends PHPUnit_Framework_TestCase {
......@@ -31,4 +31,10 @@ class MimeTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('application/javascript', Class_File_Mime::getType('js'));
}
/** @test */
public function typeOfJPGShouldBeImageJpg() {
$this->assertEquals('image/jpeg', Class_File_Mime::getType('JPG'));
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment