Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve libmagic MIME-typing solution #297

Open
lcjohnso opened this issue Mar 10, 2023 · 0 comments
Open

Improve libmagic MIME-typing solution #297

lcjohnso opened this issue Mar 10, 2023 · 0 comments

Comments

@lcjohnso
Copy link
Member

Multiple teams have run into issues with the Client's current libmagic based MIME-typing solution for non-image media. In most cases, the libmagic installation was to blame: namely, the need to install of the underlying C library in addition to the python-magic package.

Solution 1: Improve documentation to note the need for C library installation with instructions on how to execute this install. Also consider adding check for presence of C library (e.g., via ctypes.util.find_library('magic')) with explanatory error if one is not found.

Solution 2: Replace libmagic based MIME-typing with another solution. As discussed in #210, options include:

  • Use existing library for MIME-typing via extension (e.g., mimetypes)
  • Write manual extension-to-MIME mapping function, mirroring that used by the lab's subject uploader in PFE
  • ???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant