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


Vocabulary
mime.types

Inputs
filenamea filename


Outputs
mime-typea MIME type string


Word description
Outputs the MIME type associated 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 ;