wcchoi/libunrar-js

Libunrar.js without mem

Opened this issue · 1 comments

I used your lib but iis not load the mem file so app not run successfully.

libunrar.js:15 GET http://localhost/rar.zip.gz/js/libunrar.js.mem 404 (Not Found)
xhrLoad @ libunrar.js:15
asyncLoad @ libunrar.js:15
(anonymous) @ libunrar.js:31
libunrar.js:31 Uncaught could not load memory initializer http://localhost/rar.zip.gz/js/libunrar.js.mem
(anonymous) @ libunrar.js:31
(anonymous) @ libunrar.js:15
xhr_onload @ libunrar.js:15
load (async)
xhrLoad @ libunrar.js:15
asyncLoad @ libunrar.js:15
(anonymous) @ libunrar.js:31
index.html:1 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.

I wonder why I needed to add mem file if I wanted an pure javascript app. Can you provide an solution with no-mem-file libunrar.js or force iis or xampp to load it without affecting the mime (*.mem extension), (I cannot config my web host to be available with loading mem file)

Hi, I don't have experience with IIS, so can't help with that

the mem file is generated by emscripten so likely it's needed

you can take a look at wasm fork of this lib at https://github.com/tnikolai2/libunrar-js/tree/new_wasm which doesn't need the mem file (but not pure js and need to serve the wasm file with the correct mime type)