Contents

Upload Media

upload_media · Nodes · Data

Stores media bytes for workflow use.

Upload Media#

Stores media as a Verdalia object.

Input#

  • input: binary data, { binary }, { base64, mime_type, filename? }, { url }, http/https URL, an object descriptor, or { object_id }.

Binary previews are redacted metadata, not valid binary input:

{"bytes":"<binary>","mime_type":"image/png","filename":"image.png","size_bytes":12345}

bytes: "<binary>" is not byte content, not base64, and cannot be replayed. Do not paste preview JSON into configs or test inputs.

Feed runtime binary forward instead:

  • Connect the read_media output socket to upload_media.input.
  • For a binary HTTP response, pass HTTP Request.output.body to upload_media.input. If the whole HTTP output object is wired instead, use a small JavaScript node to return inputs.input.body.
  • Interpolate the runtime field into { "binary": "{{read_media.output.binary}}" } when an object wrapper is needed.

If you only have base64 JSON, pass { "base64": "...", "mime_type": "image/png", "filename": "image.png" }.

Config#

  • kind_hint: optional image, pdf, file, audio, or video.
  • filename: optional interpolated filename.
  • retention_hours: optional positive integer. Default 24. Set to null / disabled for no expiry.
  • access: private (default) or public.

A public object gets a public_url that needs no login, so it can be pasted anywhere — a Discord message, an API request body. A private object has no such URL; it is read through a short-lived signed link minted at the moment of use.

Visibility is fixed when the bytes are written and cannot be changed afterwards. To change it, upload again.

Retention applies to public objects too: the public URL stops resolving when the object expires. For a link that must keep working, disable retention.

When the input is already an object descriptor, Upload Media returns that existing object and changes neither its retention nor its access.

Output#

  • output: an object descriptor with:
    • object_id: string — the object's id, and the only identifier you need.
    • kind: image | video | audio | pdf | file.
    • content_type: string — MIME type.
    • filename: string | null — original or configured filename when known.
    • size_bytes: number — byte length.
    • public_url: string | null — a URL needing no login, present only when access is public.
    • expires_at: string — when the object is deleted (RFC 3339); present only when retention is set.
    • metadata: object — kind-specific, tagged by type:
      • { "type": "image", "width": number, "height": number }
      • { "type": "video", "width": number | null, "height": number | null, "duration_ms": number | null }
      • { "type": "audio", "duration_ms": number | null, "artist": string | null }
      • { "type": "pdf", "page_count": number | null }
      • { "type": "file" }

Limits#

  • URL downloads are bounded to 50 MB.
  • URL downloads reach public addresses only. A localhost URL is refused, and a URL that resolves to a private, loopback, link-local, or otherwise non-public address fails with URL resolves to a non-public address. Redirects are followed up to 10 hops, and every hop is checked the same way.
  • Stored media follows media object size limits.

Inputs

  • inputRequired

Outputs

  • output

Configuration

FieldTypeRequiredDescription
kind_hintenum(image, pdf, file, audio, video)NoOptional media kind when content type is generic
filenamestringNoOptional output filename
retention_hoursnullable<integer>NoHours before the uploaded media object expires; disable for no expiry
accessenum(private, public)NoPublic objects get a shareable URL that needs no login; retention still applies, so the URL stops resolving when the object expires
base_configrecordNoShared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow).