UploadMedia
Uploads an image or video. Only JPG, PNG, GIF, WEBP, MP4 media types are supported.
Stored Procedure Specific Info
Upload Media
Use this procedure to upload images or videos to Twitter. It returns media Ids, which can be used to create a Tweet with an attached photo or video. The uploaded media expires in 24 hours after the upload. The video size should not be more then 15 MB and 30 seconds of the length.
Set MediaFilePath for every media file. For example, the set of media files to upload would be the following:
MediaFilePath - path/to/file1,path/to/file2
The result of the procedure is a list of media Ids, which can be retrieved by MediaId for every media file uploaded.
Input
Name | Type | Description |
MediaFilePath | String | A comma-separated list of media file paths to upload. Takes precedence over 'Content' inputs. You can include up to 4 photos or 1 animated GIF or 1 video in a Tweet/DM with INSERT statements. |
FileName | String | The file name including extension to be used with the Content input. FileName is required for Content input. |
ContentSize | String | The total size in bytes for the Content InputStream. Required when the Content input is used instead of MediaFilePath. |
MediaCategory | String | A comma-separated list of media categories for each file path to upload or a single media category for a Content input. |
Result Set Columns
Name | Type | Description |
MediaId | String | The Ids of the media uploaded. |