I'm trying to deflate a .xlsx file on the front end and inflate it in the server side, in a asp net core 2.2 server.
I tried everything and i have this now:
//JS code
handleSaveFile = (file) => {
var compressedFile = pako.deflate(JSON.stringify(file), { to: 'string' });
this.setState({ file: compressedFile });
}
Completely straight forward, pako.deflate is enough to do the trick.
Now on the back-end i tried everything but according to the documentation ends up like this:
I tried also GZipStream, but the result is the same. I cant find anything regarding compress/decompress but there is plenty of info regarding the other way around.
Please take a look this, hope will help:
Client:
Server:
detail in : https://stackoverflow.com/a/66825721/1979406