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
3 changes: 2 additions & 1 deletion lib/file_uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var FileUploader = function (params, twit) {
assert(params.file_path, 'Must specify `file_path` to upload a file. Got: ' + params.file_path + '.')
var self = this;
self._file_path = params.file_path;
self._media_category = params.media_category
self._twit = twit;
self._isUploading = false;
self._isFileStreamEnded = false;
Expand Down Expand Up @@ -134,7 +135,7 @@ FileUploader.prototype._initMedia = function (cb) {
} else if (mediaType.toLowerCase().indexOf('video') > -1) {
media_category = 'tweet_video';
}

media_category = self._media_category || media_category;
// Check the file size - it should not go over 15MB for video.
// See https://dev.twitter.com/rest/reference/post/media/upload-chunked
if (mediaFileSizeBytes < MAX_FILE_SIZE_BYTES) {
Expand Down