Skip to content
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
Open

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

BooDoo opened this issue Apr 9, 2016 · 4 comments

Comments

@BooDoo
Copy link
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
Copy link

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.

@mattnotmitt
Copy link

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

@NNskelly
Copy link

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants