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

change to make youtube video insertion work #92

Merged
merged 2 commits into from
Oct 17, 2013
Merged

change to make youtube video insertion work #92

merged 2 commits into from
Oct 17, 2013

Conversation

jbergknoff
Copy link
Contributor

The API discovery gives a rootUrl for youtube video insertion with a trailing slash. Appending "/upload" to that in Request.prototype.generateUploadBody results in a request that gets rejected by YouTube. I'm not sure if "/upload" should be "upload" or if the rootUrl returned by discovery should not have a trailing slash. In either case, this non-destructive change resolves the symptom.

@@ -190,6 +190,7 @@ Request.prototype.generateBody = function(rootUrl) {
*/
Request.prototype.generateUploadBody = function(rootUrl) {
var params = this.params || {};
if (rootUrl.slice(-1) === "/") rootUrl = rootUrl.slice(0, -1);

This comment was marked as spam.

@rakyll
Copy link
Contributor

rakyll commented Oct 16, 2013

Thanks for the PR, I also filled #93 for the longer term improvement.

@jbergknoff
Copy link
Contributor Author

Good point, thanks. I've made the edit you suggested.

rakyll pushed a commit that referenced this pull request Oct 17, 2013
change to make youtube video insertion work
@rakyll rakyll merged commit 0697b8f into googleapis:master Oct 17, 2013
@rakyll
Copy link
Contributor

rakyll commented Oct 17, 2013

Thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants