Project

General

Profile

Actions

Patch #34969

closed

Remove dependency on MimeMagic

Added by Go MAEDA about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

In Redmine, MimeMagic is used to check that files with invalid formats are not passed to ImageMagick when generating thumbnail images with ImageMagick.

This patch replaces MimeMagic with Marcel, a gem bundled with Rails. The benefits of this change are as follows:

  • Simplifies the installation process: Due to a licensing issue, the MIME database freedesktop.org.xml was removed from MimeMagic. As a result, you have to make sure that your system has shared-mime-info before you install Redmine. Marcel bundles another database Apache Tika, so you don't have to install MIME database separately
  • Can reduce memory usage: By replacing MimeMagic with Marcel, we can reduce one gem dependency. Rails used to depend on MimeMagic, but in Rails 5.2.5 it no longer does. Now only Redmine itself depends on MimeMagic

Files


Related issues

Related to Redmine - Patch #34966: Update Rails to 5.2.5Closed

Actions
Actions

Also available in: Atom PDF