Test for AVIF is not working in PR #26
livid opened this issue · 8 comments
With the current implementation, to recognize an image, it needs to be both recognized by libmagic and Pillow. And that caused test for AVIF to fail. Because while Pillow.Image can recognize it:
But libmagic cannot:
If Pillow.Image can return a meaningful result, libmagic should not block the process.
But libmagic cannot:
This line is logged by us, first i try to get mime by using magic, if magic can't get it or result is not in our supported-mime list(means we can't handle this kind of mime), i'll log this.
Actually, in the above case, application/octet-stream
is result that mgaic get, magic
guess mime type by the first few bytes of byte stream, same as PIL, but the types supported by PIL are limited, if PIL can recognize, magic
should be able too.
It's a little strange. magic didn't get the correct mime from bytes content, i'll test and find out.
I guess you are testing on macOS.
Can you try Ubuntu or Debian?
CI is now failing for the same reason:
Sure, let me create on first😂
It seems Magic on macOS can recognize it. But the production server is running Debian with Docker.
Yes, we need to turn these tests green. Thanks!