Node.js readFileSync ZIP file

前端 未结 3 1812
甜味超标
甜味超标 2021-01-20 13:46

I am trying to read a ZIP file and output it to the browser, get the code that\'s shown on the page and save it as a ZIP file

fs.readFileSync(\'/dir/file.zip         


        
3条回答
  •  感情败类
    2021-01-20 14:20

    You're trying to read a zip file as a character encoding (utf-8) which should probably be changed to 'binary'

提交回复
热议问题