1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- (define-module (mime-types)
- #:export (file-extension-mime-types))
- (use-modules
- ((srfi srfi-69) #:prefix srfi-69:))
- ;; The following hash-table contains MIME types for common file types.
- ;; See also:
- ;; https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
- ;; https://www.iana.org/assignments/media-types/media-types.xhtml
- ;; This list of MIME types is not comprehensive. It is only a personal opinion
- ;; of what might be needed.
- (define file-extension-mime-types
- (srfi-69:alist->hash-table
- '(("bz" . application/x-bzip)
- ("bz2" . application/x-bzip2)
- ("css" . text/css)
- ("csv" . text/csv)
- ("gz" . application/gzip)
- ("gif" . image/gif)
- ("htm" . text/html)
- ("html" . text/html)
- ("jpg" . image/jpeg)
- ("jpeg" . image/jpeg)
- ("js" . text/javascript)
- ("json" . application/json)
- ("mjs" . text/javascript)
- ("odp" . application/vnd.oasis.opendocument.presentation)
- ("ods" . application/vnd.oasis.opendocument.spreadsheet)
- ("odt" . application/vnd.oasis.opendocument.text)
- ("oga" . audio/ogg)
- ("ogx" . application/ogg)
- ("png" . image/png)
- ("pdf" . application/pdf)
- ("sh" . application/x-sh)
- ("svg" . image/svg+xml)
- ("tar" . application/x-tar)
- ("tif" . image/tiff)
- ("tiff" . image/tiff)
- ("ttf" . font/ttf)
- ("txt" . text/plain)
- ("wav" . audio/wav)
- ("weba" . audio/webm)
- ("webm" . video/webm)
- ("webp" . image/webp)
- ("xhtml" . application/xhtml+xml)
- ("xul" . application/vnd.mozilla.xul+xml)
- ("zip" . application/zip)
- ("7z" . application/x-7z-compressed))))
|