Closed DJ-991 closed 8 months ago
What should be particular to Angular 11?
Just in angular how can we implement zip.js
Like in any other JavaScript/TypeScript project?
This is angular project with typescript, we need to encrypt the zip having pdf blob. Can we do this with zip.js?
Ask- whenever user open that downloaded zip, it should ask for the password.
Yes, it is probably possible to implement this. What's blocking you?
is this code is fine for encryption and zip that pdf blob? blob we are getting from API
PFA - by running: $ npm install @zip.js/zip.js
and importing the libary as an ECMAScript module: import * as zip from "@zip.js/zip.js";
using like this : useCompressionStream is giving error in code
useCompressionStream
is an option passed to zip.configure()
. See here for an example of code using encryption: https://github.com/gildas-lormeau/zip.js/blob/master/tests/all/test-crypto.js.
https://github.com/gildas-lormeau/zip.js/blob/master/tests/all/test-crypto.js should we use that code(test-crypto.js) for encryption in our typescript code and for zipping ? @gildas-lormeau
This is a code example that shows how to write a zip file with an AES password so I assume it's similar to what you want to do.
Will try this code hope this will work. @gildas-lormeau
You'll probably have to follow these instructions as well: https://github.com/gildas-lormeau/zip.js/discussions/229
getting this error after config
here it is: 1: create file inside src -
2: angular.json "serve" config
3: angular.json "builder" and "options"
4: package.json
My angular version is Angular 11. so i installed npm install -D @angular-builders/custom-webpack@11.1.1
It looks like the ES version in your project is too old. Here is the fix of a similar issue in Angular CLI:
in which file we need to change tsconfig.json or package.json ? not getting
I'm sorry but I don't know because I don't use Angular.
How can we use zip.js in Angular11? I need to encrypt zip having pdf. Please suggest, after npm install how can we use zip.js in angular framework? We have blob for the PDF.