Mastodon icon

Mastodon

Interact with Mastodon API

Actions115

Media → Upload Media

AI-generated

Overview

This node uploads media files to a Mastodon instance. It is useful for automating the process of posting images, videos, or other media content to Mastodon accounts. For example, users can upload a profile picture, share media in posts, or manage media content programmatically.

Use Case Examples

  1. Uploading an image file from a binary property to a Mastodon instance.
  2. Adding a description and focus coordinates to the uploaded media for accessibility and presentation.

Properties

Name Meaning
Mastodon URL URL of the Mastodon instance to connect to, e.g., https://mastodon.social.
Authentication Type Method to authenticate with the Mastodon instance, either OAuth2 or Access Token.
Binary Property Name of the binary property containing the file to be uploaded.
Additional Fields Optional fields to add extra information to the media, such as description and focus coordinates.

Output

JSON

  • id - Unique identifier of the uploaded media.
  • type - Type of the media (e.g., image, video).
  • url - URL where the uploaded media can be accessed.
  • preview_url - URL of the media preview or thumbnail.
  • text_url - Optional text URL associated with the media.

Dependencies

  • Requires authentication credentials for Mastodon instance, either OAuth2 or Access Token.

Troubleshooting

  • Ensure the binary property name matches the actual binary data property in the input.
  • Verify the Mastodon URL is correct and accessible.
  • Check that the selected authentication type matches the provided credentials.
  • Common errors include missing credentials or unsupported operations for the media resource.
  • If the node throws an error about invalid method or operation, verify the operation name and resource are correctly set.

Discussion