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

Use yihui's mime package for `guess_media()` #148

jimhester opened this Issue Sep 9, 2014 · 1 comment


None yet
2 participants

jimhester commented Sep 9, 2014

It looks like you and @yihui both wrote separate implementations to guess mime types by parsing the mime.types file

As @yihui has added some R specific extensions to the lookup table it might be worth using that implementation to standardize things.

We can preserve all existing functionality with

guess_media <- function(x) { mime::guess_type(x, empty = NULL) }

This comment has been minimized.

yihui commented Sep 9, 2014

There are a couple of packages that need to guess MIME, and I wanted to avoid copying the big list of MIME mapping info in every package, so I put together the little mime package. I have used it in the servr and markdown package, and I plan to use it in shiny as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment