File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 723723 * File size
724724 * @type {number }
725725 */
726- this . size = this . fileProxy . size ;
726+ this . size = file . size ;
727727
728728 /**
729729 * Relative file path
11221122 * Size of a chunk
11231123 * @type {number }
11241124 */
1125- var chunkSize = this . flowObj . opts . chunkSize ;
1125+ this . chunkSize = this . flowObj . opts . chunkSize ;
11261126
11271127 /**
11281128 * Chunk start byte in a file
11291129 * @type {number }
11301130 */
1131- this . startByte = this . offset * chunkSize ;
1131+ this . startByte = this . offset * this . chunkSize ;
11321132
11331133 /**
11341134 * Chunk end byte in a file
11351135 * @type {number }
11361136 */
1137- this . endByte = Math . min ( this . fileObj . size , ( this . offset + 1 ) * chunkSize ) ;
1137+ this . endByte = Math . min ( this . fileObj . size , ( this . offset + 1 ) * this . chunkSize ) ;
11381138
11391139 this . data = null ;
11401140
12721272 preprocessFinished : function ( ) {
12731273 // Compute the endByte after the preprocess function to allow an
12741274 // implementer of preprocess to set the fileObj size
1275- this . endByte = Math . min ( this . fileObj . size , ( this . offset + 1 ) * chunkSize ) ;
1276- if ( this . fileObj . size - this . endByte < chunkSize &&
1275+ this . endByte = Math . min ( this . fileObj . size , ( this . offset + 1 ) * this . chunkSize ) ;
1276+ if ( this . fileObj . size - this . endByte < this . chunkSize &&
12771277 ! this . flowObj . opts . forceChunkSize ) {
12781278 // The last chunk will be bigger than the chunk size,
1279- // but less than 2*chunkSize
1279+ // but less than 2*this. chunkSize
12801280 this . endByte = this . fileObj . size ;
12811281 }
12821282 this . preprocessState = 2 ;
You can’t perform that action at this time.
0 commit comments