mime-type ( filename -- mime-type )
MIME types


Vocabulary
mime.types

Inputs and outputs
filenamea filename
mime-typea MIME type string


Word description
Outputs the MIME type associtated with a path by parsing the path's file extension and looking it up in the table returned by mime-types.

Definition


: mime-type ( filename -- mime-type )
file-extension mime-types at "application/octet-stream" or ;