# Upload Media

<!-- meta: type=upload-media; location=Media; category=Step (action); platforms=Joomla and WordPress (where applicable) -->

## Overview

Saves an image or video onto your Joomla site under the /images folder, so articles and other steps can link to it.

When the flow reaches this step, JOrchestrator executes **Upload Media** against your linked site or an external integration, using the field values you set on **General** and **Design**. Downstream steps can read the output payload fields defined for this node.

## Why use this node

Upload Media is a **action step** in the **Media** group. Action steps run in the middle or end of a flow. They perform work on your CMS, call external services, or transform data for the next step.

Typical reasons teams add **Upload Media** to a flow:

- Upload Media on your linked Joomla site when the flow reaches this step
- Upload media based on webhook, schedule, or CMS event data
- Integrate Media operations with messaging, AI, or database steps in one canvas

## Example workflows

Common patterns on the canvas:

1. **Trigger or Webhook** → upstream steps → **Upload Media** → **Send Email** or CMS update
2. **Scheduled trigger** → **Upload Media** → **Debug** (while testing) → production action

## How to set it up

On the Design tab, choose the folder and file name, then provide the file from a web address, pasted image/video data, or a field dragged in from an earlier step (for example a link from an AI or video step).

## Good to know

Use a random file name when the incoming file has no fixed name — common after AI image or video generation.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `useRandomFileName` | Random file name | `toggle` (default: `false`) | No | — | On: base64/URL use a unique name ({prefix}-{random}.ext). New nodes default to on. Off: set the full path and filename below. |
| `randomNameSalt` | Name prefix (optional) | `random-name-salt` | No | `useRandomFileName === true` | — |
| `folder` | Folder under /images | `payload-text` | No | — | e.g. blog/2024 — optional. Only drag fields from nodes connected before this one (e.g. not {{ai.title}} if upload runs before AI). |
| `relativeFilePath` | Path under folder | `textarea` | No | — | Random name ON: optional subfolders only (e.g. 2025/q1), no filename. OFF: full path + file name (e.g. shots/hero.png). Drag payload fields. |
| `imageSource` | Media URL, body, or data URI | `textarea` | **Yes** | — | https://…, data:image/png;base64,…, or {{node_0.body}} / {{node_0.mediaUrl}} from retrieve or social nodes Drag body, mediaUrl, or url fields from upstream retrieve/API nodes. Base64 body from S3/GCS/SFTP download is supported. |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{upload_media.success}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `success` | boolean | Whether the operation completed successfully. |
| `skipped` | boolean | True when the file was intentionally skipped (e.g. .txt in an S3 bucket sync). |
| `path` | string | Relative path under /images where the file was saved. |
| `url` | string | Public HTTP URL to a resource on the site. |
| `image` | string | Public URL to an image asset (alias of url/media). |
| `filename` | string | File name without directory path. |
| `bytesWritten` | number | Number of bytes written to storage. |
| `message` | string | Human-readable status, error, or result summary. |

## Validation rules

- **Media URL, body, or data URI** (`imageSource`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **Delete Media** (`delete-media`) — Media
- **Delete Media** (`wp-delete-media`) — Media
- **Retrieve Media** (`retrieve-media`) — Media
- **Retrieve Media** (`wp-retrieve-media`) — Media
- **Update Media** (`update-media`) — Media
