79477506

Date: 2025-03-01 11:55:23
Score: 1
Natty:
Report link

Did you correctly alter the MIME type to be a zip? Does the backend return a valid ZIP file? Here's an example implementation using FileSaver:

this.http.get('/api/download-zip', { responseType: 'arraybuffer' })
  .subscribe((data: ArrayBuffer) => {
  // Create blob of type zip
  const blob = new Blob([data], { type: 'application/zip' });
  // Use file-saver to prompt user to save file
  FileSaver.saveAs(blob, 'my-excels.zip');
);
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you
  • Low reputation (0.5):
Posted by: anaslim