-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello! I am using client-zip to package up audio tracks (probably ~75-100 at a time) in my NextJS app. The first few times I ran this, it was excitingly performant considering my input. However, after those initial test attempts I am now getting TypeError: Failed to fetch. Is there a better way to handle this based on my use case? I just copy pasta'd the example usage code so I very well could be missing something that would help me out here.
Thank you!
const createZip = async (tracks) => {
console.log("started");
let files: any = [];
tracks.map((track) => {
track.clips.forEach((clip) => {
files.push({ name: `${track.name}/${clip.name}`, input: clip.content });
});
});
try {
// get the ZIP stream in a Blob
const blob = await downloadZip(files).blob();
// make and click a temporary link to download the Blob
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "MultiTracks.zip";
link.click();
link.remove();
console.log("finished");
} catch (err) {
console.log(err);
}
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels