richardgirges / express-fileupload

Simple express file upload middleware that wraps around busboy
MIT License
1.52k stars 261 forks source link

problem with md5 value #323

Closed navkc11 closed 11 months ago

navkc11 commented 2 years ago

hello i have file with the char $ and the md5 is not correct according anthoer websites or libary that make md5 for $

RomanBurunkov commented 11 months ago

Did you mean file which contains one character '$'? Which md5 you got?

Online MD5 generator for one character '$' says it should be: 'c3e97dd6e97fb5125688c97f36720cbe'

RomanBurunkov commented 11 months ago

Was not able to reproduce. Probably your file contains hidden symbols like new line, etc.

Created a file which contains only one symbol: '$'. Run test server and uploaded the file, always got correct md5 value:

  inpFile: {
    name: 'test.txt',
    data: <Buffer 24>,
    size: 1,
    encoding: '7bit',
    tempFilePath: '',
    truncated: false,
    mimetype: 'text/plain',
    md5: 'c3e97dd6e97fb5125688c97f36720cbe',
    mv: [Function: mv]
  }