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

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

Closed
jimhester opened this issue Sep 9, 2014 · 1 comment
Closed

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

jimhester opened this issue Sep 9, 2014 · 1 comment

Comments

@jimhester
Copy link
Member

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

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) }
@yihui
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants