Skip to content
Snippets Groups Projects
Commit 8df8c31e authored by efalcy's avatar efalcy
Browse files

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

parents 6fe74a02 4a42aa6f
Branches
Tags
5 merge requests!3297WIP: Master,!3220Master,!3216WIP: Koha pagination le retour,!3212Hotline,!3204Hotline#93504 binum pdf open
Pipeline #8037 passed with stage
in 37 minutes and 58 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 typeOfJPGShonuldBeImageJpg() {
$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