You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we use a variation of what the original SunOS magic file had in it to deternine the filetype of a submission. This works, somewhat, but is ugly. For example, we recently had a pull request because images with EXIF data (so, pretty much anything taken with a modern phone or digital camera) weren't detected as JPEG based on the old magic file.
There is python-magic which will use the libmagic C library to return the correct filetype or MIME type if needed. To use it, we need to refactor our allowed filetypes, as we returned much simpler strings back than what libmagic does.
The text was updated successfully, but these errors were encountered:
Right now, we use a variation of what the original SunOS magic file had in it to deternine the filetype of a submission. This works, somewhat, but is ugly. For example, we recently had a pull request because images with EXIF data (so, pretty much anything taken with a modern phone or digital camera) weren't detected as JPEG based on the old magic file.
There is python-magic which will use the libmagic C library to return the correct filetype or MIME type if needed. To use it, we need to refactor our allowed filetypes, as we returned much simpler strings back than what libmagic does.
The text was updated successfully, but these errors were encountered: