Querying file extension by the MIME type may return multiple extensions
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start in R/thumbnail.R at the MIME-to-extension lookup and read tests/testthat/test-thumbnail.R, especially the test that assumes a particular JPEG extension. Reproduce the behavior with the current mime package, then establish a test expectation that does not depend on extension ordering and run the thumbnail tests.
Written by the indexing model from the issue text.
Description
When multiple extensions have the same MIME type, the code here can become problematic:
For example, image/jpeg currently corresponds to four extension in the dev version of the mime package:
library(mime)
mimemap[mimemap == 'image/jpeg']
jfif jpe jpeg jpg
"image/jpeg" "image/jpeg" "image/jpeg" "image/jpeg"
That means the test here will be broken (since it assumes the first extension to be .jpeg, which has become .jfif in the dev version of mime):
- Dominant language
- R
- Stars
- 54
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/connectapi
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
posit-dev/connectapi#249 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
posit-dev/connectapi#527 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
posit-dev/connectapi#526 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/connectapi#506 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
posit-dev/connectapi#486 ·
All issues in posit-dev/connectapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
rfordatascience/tidytuesday#1089 ·
-
Component: R Type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow#51695 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nflverse/nflverse-rosters#102 ·
-
bug priority: should
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
The-Strategy-Unit/nhp_outputs#477 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InseeFrLab/melodi#27 ·