Reputation: 67
I perform POST for initial upload ticket and url is api.vimeo.com/me/videos.Then i do PUT for uploading and verifying the video and also i have the upload access My intiial upload ticket request looks like:
MediaUploader.prototype.upload = function() {
var self = this;
var xhr = Ti.Network.createHTTPClient();
var upgrade_to_1080 = (this.upgrade_to_1080 == 'yes') ? true : false;
Ti.API.info("thi.url" + this.url);
xhr.open('POST', this.url);
xhr.setRequestHeader('Authorization', 'Bearer ' + this.token);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onload = function(e) {
Ti.API.info("eee" + JSON.stringify(e));
Ti.API.info("responsetext" + e.source.responseText);
Ti.API.info("status" + e.source.status);
// get vimeo upload url, user (for available quote), ticket id and complete url
}.bind(this);
xhr.onerror = this.onUploadError_.bind(this);
var d = {
type : 'streaming',
upgrade_to_1080 : upgrade_to_1080
};
xhr.send(d);
};
This is the response I am getting
uri : /users/user44077797/tickets/da8942161740282fc2864cb3352f061a
ticket_id : da8942161740282fc2864cb3352f061a
user :{object}
upload_link : {Link}
form : {some html}
upload_link_secure : {Link}
I Also checked this stack overflow question but it didn't resolved my problem. My access token has upload permissions and using the latest vimeo API's . Please help me in this.
Upvotes: 1
Views: 486
Reputation: 3998
If you are receiving the form
key, and not the complete_uri
key it means you are not properly requesting the type=streaming
upload ticket.
Are you able to verify (via a proxy or additional logging) that your request is being sent as expected?
You should also be able to check by using your browsers network panel.
Upvotes: 1