Error code 131: Internal error while calling media/upload

oauth

#1

I’m working on a command line tool and I want to add the posibility to upload media to refrence in tweets. My OAuth signature has been working with no problem with the update endpoint and the upload_with_media. But now that I’m adding the media upload I get the error from the subject inside an error http 500.
Any suggestions?


#2

Can you provide self-contained sample code and the file that works/used to work?


#3

Thanks for getting back at me @rchoi. It’s hard to provide a self-contained sample code but I’ll try to give you every info you need.

I uploaded a couple of files to my OneDrive so you can see what I’m seeing with Fiddler.
Here’s what I get when I try to send the raw file: http://1drv.ms/1KKVxqE
And this is the one in base64: http://1drv.ms/1KKVyLe

In both cases I get the error from the subject.
I also tried to use twurl in order to see what is it sending but I get another error :frowning: (mentioned here: https://github.com/twitter/twurl/issues/58)

Here’s the pic I’m trying to upload. please let me know if there’s anything I can help you with in order to help me.


#4

Hi @sebagomez, I was unable to reproduce this myself; I used the twurl call below to upload successfully. I’m reaching out to the Media Platform team in case they have any insight or know of common issues that would result in a 131.

twurl -H upload.twitter.com -X POST "/1.1/media/upload.json" --file "8d0ef4532ae15f9830160ce5af7062a0af340c3d.jpg" --file-field "media"

#5

Tracking this internally as PREL-14340.


#6

pasting this same command with twurl I get {"request":"\/1.1\/media\/upload.json","error":"media type unrecognized."} :frowning:

Win 8.1 x64 with ruby 2.2


#7

Hey @jbulava @rchoi, any news on this issue?


#8

Sorry for delay, and sure you’ve figured it out.

But I tested the file you uploaded via a quick tool, both as binary and base64, and it didn’t have any issues.

Tool is available here:

http://django-rest-apis.herokuapp.com/media

Source available here:


#9