Skip to content

Commit 48fb66e

Browse files
committed
(breaks backward compatibility) remove deprecated file.length
1 parent 696b576 commit 48fb66e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/file.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ util.inherits(File, EventEmitter);
3333
// @todo Next release: Show error messages when accessing these
3434
File.prototype._backwardsCompatibility = function() {
3535
var self = this;
36-
this.__defineGetter__('length', function() {
37-
return self.size;
38-
});
3936
this.__defineGetter__('filename', function() {
4037
return self.name;
4138
});

test/legacy/system/test-multi-video-upload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ server.on('request', function(req, res) {
2424
file
2525
.on('progress', function(bytesReceived) {
2626
tracker.progress.push(bytesReceived);
27-
assert.equal(bytesReceived, file.length);
27+
assert.equal(bytesReceived, file.size);
2828
})
2929
.on('end', function() {
3030
tracker.ended = true;
@@ -43,7 +43,7 @@ server.on('request', function(req, res) {
4343
assert.ok(uploads['shortest_video.flv'].ended);
4444
assert.ok(uploads['shortest_video.flv'].progress.length > 3);
4545
assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a');
46-
assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.length);
46+
assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.size);
4747
assert.ok(uploads['shortest_video.mp4']);
4848
assert.ok(uploads['shortest_video.mp4'].ended);
4949
assert.ok(uploads['shortest_video.mp4'].progress.length > 3);

0 commit comments

Comments
 (0)