# Store Picked Image File

Stores a user-picked JPEG, PNG, GIF or WebP file in the email-editor image library and returns its public URL. Only for the MCP App upload form of open-email-editor-image-upload; maximum 5 MB and no overwrite.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "fileName": {
      "type": "string",
      "description": "Name of the picked file, as the browser reports it; sanitised, extension set from the bytes, a taken name is numbered, never overwritten -- see storedAs",
      "minLength": 1,
      "maxLength": 250
    },
    "contentBase64": {
      "type": "string",
      "description": "The file's bytes as plain base64, no data: prefix",
      "minLength": 1,
      "maxLength": 6990508
    },
    "folder": {
      "type": [
        "null",
        "string"
      ],
      "description": "Folder of the library to store it in, as list-email-editor-image-folders lists it; omit for the library's root",
      "default": null,
      "maxLength": 250
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account the access token works in",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "fileName",
    "contentBase64"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "uploaded",
    "storedAs",
    "image",
    "folders",
    "html"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "uploaded": {
      "type": "boolean"
    },
    "storedAs": {
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "url",
        "path",
        "fileName",
        "mimeType",
        "sizeBytes",
        "uploadedAt",
        "width",
        "height"
      ],
      "properties": {
        "url": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "fileName": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "sizeBytes": {
          "type": "integer"
        },
        "uploadedAt": {
          "type": "string"
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "folders": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "html": {
      "type": "string"
    }
  }
}
```

