Closed inkhey closed 4 years ago
note: we need to check each file_extension imagemagick support "theorically" to add proper mimetype ( and add custom one ?), this way we can reactivate support for new format.
I'm not a fan of having builder specific code in utils.py, I don't feel the move is needed.
But it looks like a good idea to try to make imagemagick output a correct list of supported mimetypes. I think you can also remove text/plain (see https://github.com/algoo/preview-generator/issues/118), it would probably close many issues in the range 113-118, if not all.
I rebased on top of #155 and applyed my randomization patch from #113, and it looks like this PR helps a lot!
I'm not a fan of having builder specific code in utils.py, I don't feel the move is needed.
The problem is that the code used there is for both IM and wand builder, so we need to put this in a common space.
But it looks like a good idea to try to make imagemagick output a correct list of supported mimetypes. I think you can also remove text/plain (see #118), it would probably close many issues in the range 113-118, if not all.
all "text/" mimetype are removed by default, including text/plain.
Note: there is also some file type that imagemagick does support that we do not support yet because of mimetype issue (see https://github.com/algoo/preview-generator/issues/157).
related to #118, #113, #115, #116, #117, #134
Remove support for pdf,text file, svg and other non-image file support for imagemagick/wand by having a better imagemagick supported type list
:warning: recheck all file_extension "supported by imagemagick" to check if some mimetype are missing (file_extension supported but no correct match to mimetype)see https://github.com/algoo/preview-generator/issues/157