uploadMedia abstract method
- @Deprecated('Still works, but officially deprecated. Use v2 endpoint instead')
- required File file,
- File? thumbnail,
- String? description,
- MediaFocalPoints? focus,
Creates an attachment to be used with a new status.
This method will return after the full sized media is done processing.
Parameters
-
file
: The file to be attached, encoded using multipart form data. -
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
- POST /api/v1/media HTTP/1.1
Authentication Methods
- OAuth 2.0
Required Scopes
- write:media
Reference
Implementation
@Deprecated('Still works, but officially deprecated. Use v2 endpoint instead')
Future<MastodonResponse<MediaAttachment>> uploadMedia({
required File file,
File? thumbnail,
String? description,
MediaFocalPoints? focus,
});