Skip to content
Snippets Groups Projects
Commit 4a42aa6f authored by efalcy's avatar efalcy
Browse files

hotline#93504 : Bibliothèque numérique : pouvoir ouvrir/télécharger des images avec l'extension JPG

parent 6229f181
Branches
Tags
6 merge requests!3297WIP: Master,!3220Master,!3216WIP: Koha pagination le retour,!3212Hotline,!3204Hotline#93504 binum pdf open,!3201Hotline#93504 bibnum ouvrir un pdf pas d extension
Pipeline #8029 passed with stage
in 36 minutes and 40 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