Revert dynamic file extension detection to hardcoded 'jpg' (#218)

This commit is contained in:
Jonathan Durand
2026-01-16 20:14:56 +01:00
committed by GitHub
parent 5d19a1b860
commit 3b6139ed23
+6 -1
View File
@@ -1454,7 +1454,12 @@ class Workbook {
}
this.initRichData();
const maxFildId = this.findMaxFileId(/xl\/media\/image\d*\..*/, /image(\d*)\./);
const fileExtension = substitution.split('.').pop();
/**
* Setting extension back to "jpg" which works for all image formats
* for now. Proper extension detection will be addressed in a future PR
* with appropriate testing.
*/
const fileExtension = "jpg";
try {
substitution = this.imageToBuffer(substitution);
}