Skip to content

Commit

Permalink
Merge pull request #6 from richardgirges/master
Browse files Browse the repository at this point in the history
Merge to actual version
  • Loading branch information
RomanBurunkov authored Jun 7, 2019
2 parents a61e8bf + 4bfd2b7 commit a5a8b98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 171 deletions.
2 changes: 1 addition & 1 deletion lib/memHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (options, fieldname, filename) => {
let fileSize = 0; // eslint-disable-line
let hash = crypto.createHash('md5');

const getBuffer = () => Buffer.concat(buffers);
const getBuffer = () => Buffer.concat(buffers, fileSize);
const emptyFunc = () => '';

return {
Expand Down
178 changes: 8 additions & 170 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions test/utilities.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ describe('Test of the utilities functions', function() {
let dir = path.join(uploadDir, 'testfolder', 'testfile');
assert.equal(checkAndMakeDir({createParentPath: true}, dir), true);
});
//
it('checkAndMakeDir creates a dir recursively if path to the file not exists', ()=>{
let dir = path.join(uploadDir, 'testfolder', 'testsubfolder', 'testfile');
assert.equal(checkAndMakeDir({createParentPath: true}, dir), true);
});
});
//saveBufferToFile tests
describe('Test saveBufferToFile function', function(){
Expand Down

0 comments on commit a5a8b98

Please sign in to comment.