0

I was trying to access a zip inside my react app without extracting the zip I need to know if a specific file is there inside a zip or not. I don't want to use any third-party application? Is it possible to get the same in JavaScript?

I have tried to use AdmZip and JSZip library as well but it's not working. In Adm Zip I'm getting file Module not found: Can't resolve 'fs'

Muhammad Mohsin Khan
  • 1,444
  • 7
  • 16
  • 23
Aastick
  • 91
  • 1
  • 1
  • 7
  • 1
    that kind of I/O operations are likely performed server-side. The errors you have is because those libraries target NodeJS, hence server, not browser. – Mario Vernari Jan 14 '22 at 10:28
  • "_I need to know if a specific file is there_": What type of information are you trying to access about the files within the archive? Do you mean the file name? For JSZip, see this doc page: https://stuk.github.io/jszip/documentation/examples/read-local-file-api.html – jsejcksn Jan 14 '22 at 10:29
  • @jsejcksn Yes, I need only the file name, so that I can check specific file is exist or not. – Aastick Jan 14 '22 at 17:05

0 Answers0