This commit is contained in:
2026-07-29 13:24:36 +02:00
parent 7e26cfd6d3
commit f5f6a1e143
8 changed files with 1041 additions and 888 deletions
+14 -1
View File
@@ -1,3 +1,16 @@
# racket-mimetypes
Gives a mimetype for an extension
Returns the MIME type for a file extension, file name, or path.
The package uses a bundled fallback table and silently checks Apache's
`mime.types` in a background thread. A successful update is checked again
after seven days. A failed update is retried after one day. The validated
table is cached below Racket's user cache directory.
```racket
(require racket-mimetypes)
(mimetype-for-ext "music.opus")
(mimetype-for-ext 'png)
(mimetype-for-ext "unknown" #:default "application/octet-stream")
```