Since MIME type checking is a security feature, not implementing a simple way to disable it is voluntary. You can set a single allowed MIME type of .* in order to allow everything since it's a regex.
On top of that however, I would have:
Placed the variable down below the dangerous line
Placed the truth check before the regex check
For the reasons described above, I will therefore not merge this commit to the base branch. Thank you for your contribution though, and feel free to keep your fork if you wish of course.
Since MIME type checking is a security feature, not implementing a simple way to disable it is voluntary. You can set a single allowed MIME type of
.*
in order to allow everything since it's a regex.On top of that however, I would have:
For the reasons described above, I will therefore not merge this commit to the base branch. Thank you for your contribution though, and feel free to keep your fork if you wish of course.