updateMedia abstract method

Future<MastodonResponse<MediaAttachment>> updateMedia({
  1. required String mediaId,
  2. File? thumbnail,
  3. String? description,
  4. MediaFocalPoints? focus,
})

Update a MediaAttachment’s parameters, before it is attached to a status and posted.

Parameters

  • mediaId: The ID of the MediaAttachment in the database.

  • thumbnail: The file to be attached, encoded using multipart form data.

  • description: A plain-text description of the media, for accessibility purposes.

  • focus: Two floating points (x,y) ranging from -1.0 to 1.0.

Endpoint Url

  • PUT /api/v1/media/:id HTTP/1.1

Authentication Methods

  • OAuth 2.0

Required Scopes

  • write:media

Reference

Implementation

Future<MastodonResponse<MediaAttachment>> updateMedia({
  required String mediaId,
  File? thumbnail,
  String? description,
  MediaFocalPoints? focus,
});