388 questions
1
vote
1
answer
107
views
Adding a PDF file to a zip file containing images with JSZIP and jQuery
I create a zip file containing images (with their urls extracted server-side via classic asp code) and it works fine.
I was inspired by this excellent example [https://jsfiddle.net/jaitsujin/zrdgsjht/]...
1
vote
0
answers
57
views
When will Jszip return null?
The signature of a JSZip folder(name) method is this:
/**
* Returns a new JSZip instance with the given folder as root
*
* @param name Name of the folder
* @return New JSZip object with the given ...
0
votes
1
answer
307
views
When downloading files or downloading multiple files in a zip, it shows the file is insecure or corrupted at times
Have a downloadFiles function in my code which allows users to either download individual files or multiple files in a zip. However, every download comes back as insecure or corrupted, not sure where ...
0
votes
1
answer
91
views
Creating zip file from image blobs on a content script of firefox extension
I'm developing a browser extension that works on Firefox and Chrome, one of its features is to download a zip file with images (webp or png) and I'm using JSZip to create the zip file, but it does not ...
1
vote
3
answers
211
views
Freezing of the interface when using the "jszip" library in a React Native (Expo) project
import JSZip from "jszip";
const createArchive = async() => {
// Some code
const zip = new JSZip();
const data = getExampleData();
zip.file("example.json", data)...
0
votes
1
answer
81
views
JSZip generateAsync TypeError: e3.charCodeAt is not a function
import JSZip from 'jszip';
import FileSaver from 'file-saver';
const exportData = (evt: any) => {
var reportFileName = 'myreport.zip';
const ziptool = new JSZip();
var blob_raw_data = { id: '...
1
vote
1
answer
292
views
Using JSZip with async dynamic imports
I am working on an Angular 18 project that uses JSZip to compress multiple .txt files into an archive. I was previously using the "usual" JSZip syntax like such:
import JSZip from "...
0
votes
0
answers
265
views
How to unzip a file using JavaScript that is in base64 format
I have base64 string that is a zip file. I need to extract the file the zip file and to do so I was trying to utilize a library noted in an answer here on Stack Overflow called fflate:
...
0
votes
0
answers
125
views
How to convert an optimized binary string to an Excel file using JSZip?
I am new to JSZip and I am attempting to add an Excel file to a ZIP file by utilizing (what is referred to in the JSZip documentation as) an optimizedBinaryString option. The documentation reads as ...
1
vote
1
answer
507
views
Having trouble downloading and unzipping image file in React Native Expo app
This function downloads a zip file and unzips it and saves the unzipped image files into the expo file system of the React Native Expo app. It does successfully download the file, unzip and save the ...
0
votes
2
answers
163
views
Multple files zipped & uploaded at the same time without causing memory overflow
In my app (Laravel + Inertia + Vue3) user selects multiple files using input. I need to compress them into zip and upload to server in chunks for further operations.
I tried using JSZip library, but ...
0
votes
1
answer
225
views
Zip file. Have a zip file with many files, but only one in the central directory. How can I programmatically rebuild central directory. Using JSZip
Have a zip file with many files, but only one file is in the central directory. How can I programmatically rebuild the central directory? My project is using the browser implementation of JSZip.
I ...
-2
votes
1
answer
526
views
Best js package for zipping and attaching files to send to API?
I'm working on a Vue.js application and need to zip data into files, attach them to a zip folder, and then post the zip folder to an API. I've come across two packages, Zip and JSZip, but I'm unsure ...
0
votes
0
answers
673
views
RangeError: Array buffer allocation failed using JSZip
I'm working on an application that allows users to download images related to a project. Each project has several different images relating to them. On my application I have a button that allows users ...
0
votes
1
answer
387
views
Is there a way to rename a file in JSZip?
I have a file (or folder) in JSZip. I need to rename/move it.
const zip = new JSZip();
zip.file("file.txt", "File Content");
zip.rename("file.txt", "newname.txt"...