Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ util.inherits(resumableUpload, EventEmitter);
//Init the upload by POSTing google for an upload URL (saved to self.location)
resumableUpload.prototype.upload = function() {
var self = this;
if ((this.metadata.snippet.title).length > 70) {
self.emit('error', new Error("Title cannot be longer than 70 characters"));
}

var options = {
url: 'https://' + self.host + self.api + '?uploadType=resumable&part=snippet,status,contentDetails',
headers: {
Expand Down