Uploads a media file to X (formerly Twitter) for attachment to a tweet.
This function uploads a media file to X, which can then be attached to a tweet. It takes a Buffer object containing the media file and its MIME type as parameters, and returns a promise that resolves to a MediaUploadResponse object containing details about the uploaded media.
post/upload
Request body
Response
Successful media upload