[mime.add]

mime.add is a slot in the mime namespace, in Hyperlambda, the language of Magic Cloud. Associates a file extension with a MIME content-type so the server returns the correct Content-Type header for matching responses.

  • Value (content-type), required: File extension or MIME type key to register

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
unnamed child node string yes MIME type value for the extension/key.

Guide: How to use [mime.add]

JSON declaration

This is the complete declaration of mime.add, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "mime.add",
  "description": "Associates a file extension with a MIME content-type so the server returns the correct Content-Type header for matching responses",
  "signature": {
    "input": {
      "kind": "content-type",
      "description": "File extension or MIME type key to register",
      "required": true,
      "mode": "ValueOrExpression"
    },
    "children": [
      {
        "type": "string",
        "kind": "mime-type",
        "description": "MIME type value for the extension/key",
        "required": true,
        "mode": "ExecutableLambda",
        "cardinality": "ExactlyOne",
        "role": "SourceExpression",
        "evaluation": "EvalSelf",
        "projection": "Value"
      }
    ]
  }
}

all mime.* slots mime.create →