ttezel / twit

Twitter API Client for node (REST & Streaming API)
4.31k stars 568 forks source link

postMediaChunked Hangs #481

Open ImDestinedMe opened 6 years ago

ImDestinedMe commented 6 years ago

Trying to upload a 7MB video using postMediaChunked takes over a minute to respond for some reason. I made sure the video is the right codec by trying to upload it through the website and that responds almost instantly, but this hangs for some reason.

twit.postMediaChunked({ file_path: file }, function (err, data, resp) { if (err) { console.log(Failed: ${err}) } else { console.log(data) } })

arjunkomath commented 6 years ago

I'm facing the same issue, uploading GIF images fail and I see this error:

{ Error: ETIMEDOUT
at Timeout._onTimeout (/var/task/node_modules/request/request.js:845:19)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
code: null,
connect: true,
statusCode: null,
allErrors: [],
twitterReply: '' }
arjunkomath commented 6 years ago

@ImDestinedMe Try this fix #482