New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET media/upload (processing status) not possible #259

Open
BooDoo opened this Issue Apr 9, 2016 · 4 comments

Comments

Projects
None yet
5 participants
@BooDoo
Contributor

BooDoo commented Apr 9, 2016

Can submit a PR (piggy backing on my pending #258) but just wanted to log it so I don't forget:

GET media/upload is now a documented endpoint (for checking processing status of uploaded media by media_id) so current forced content-type: multipart/form-data based on endpoint alone is not longer viable.

Need to also add a check to ensure POST method is requested before using form-data process.

Should be simple, but I can't easily write tests right now since media API is currently throwing a lot of "Over capacity" errors.

@muffinista

This comment has been minimized.

muffinista commented Apr 27, 2016

I spent a little time recently in the media/upload rabbit-hole. I was able to get status checks working by updating _buildReqOpts to add any parameters to the URL if the request method is GET. Then I can call this:

T.get('media/upload', { command:'STATUS', media_id:mediaIdStr },  function (err, data, response) {
  console.log(data);
});

And get back the expected response.

I can add a test and make a PR if this seems like the right direction. As coded, this could theoretically break some existing GET requests although I don't think that is likely.

@artemisbot

This comment has been minimized.

artemisbot commented Jun 15, 2017

@ttezel seeing as you're doing some work on this library again at the moment, is this on your radar?

@NNskelly

This comment has been minimized.

NNskelly commented Jul 11, 2018

Just encountered this one myself, which is frustrating now that chunked upload is otherwise finally working again.
Will try muffinista's patch; otherwise, since I don't have time to dig deep into what exactly is added/manipulated between params & finalParams, I'm considering just conditionally skipping the finalParams={} on a GET.

@zeegb

This comment has been minimized.

zeegb commented Jul 20, 2018

@ttezel Can you reslove this question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment