Behavior:
Call 1.1/media/upload.json and pass in either an animated gif or a very large (say 4MB) JPG. The call upload call will appear to succeed and returns valid JSON such as.
{
image = {
h = 135;
"image_type" = "image/animatedgif";
w = 246;
};
"media_id" = 472434892840927232;
"media_id_string" = 472434892840927232;
size = 407866;
}
Following up with an statuses/update such as 1.1/statuses/update.json?media_ids=472434892840927232&status=Test will fail with a 400 error message with an error code of 214 and message of "Bad request.".
Expected Result:
Preferably the status would post or alternatively 1.1/media/upload.json should provide some indication that the uploaded media is not valid. If neither of these are possible, perhaps the error message could be updated to be a little more indicative of the problem.
Updates
Per a call to https://api.twitter.com/1.1/help/configuration.json the limit is currently < 4Mb (specifically it is 3Mb).
It is annoying and unusual that the call appears to succeed - will raise this.