Skip to content

Commit 0342a63

Browse files
committed
Fixed an error in validateRequest
When uploading files greater than 2Mb I found that where 'invalid_flow_request4' was returned, this was due to it concatenating the strings instead of adding them together, fixed with parseInt. Problem solved.
1 parent d69e783 commit 0342a63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

samples/Node.js/flow-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = flow = function(temporaryFolder) {
4747
// The chunk in the POST request isn't the correct size
4848
return 'invalid_flow_request3';
4949
}
50-
if (numberOfChunks > 1 && chunkNumber == numberOfChunks && fileSize != ((totalSize % chunkSize) + chunkSize)) {
50+
if (numberOfChunks > 1 && chunkNumber == numberOfChunks && fileSize != ((totalSize % chunkSize) + parseInt(chunkSize))) {
5151
// The chunks in the POST is the last one, and the fil is not the correct size
5252
return 'invalid_flow_request4';
5353
}

0 commit comments

Comments
 (0)