Add debug logging for filename download issue
Some checks failed
Push & Release 🌍 / Automation 🎛️ (push) Has been cancelled
Push & Release 🌍 / Unstable release 🚀⚠️ (push) Has been cancelled
Push & Release 🌍 / Quality checks 👌🧪 (push) Has been cancelled
Push & Release 🌍 / GitHub CodeQL 🔬 (push) Has been cancelled
Push & Release 🌍 / Deploy 🚀 (push) Has been cancelled

This commit is contained in:
mani
2026-01-08 02:17:22 +01:00
parent 11c6d8250c
commit c7942c7d8b

View File

@@ -42,6 +42,9 @@ export default function (items) {
// Support both old format (array of URLs) and new format (array of objects with url+filename)
const isOldFormat = typeof items[0] === 'string';
console.log('multiDownload received items:', items);
console.log('isOldFormat:', isOldFormat);
if (typeof document.createElement('a').download === 'undefined' || browser.iOS) {
const urls = isOldFormat ? items : items.map(item => item.url || item);
return fallback(urls);
@@ -52,6 +55,7 @@ export default function (items) {
items.forEach(function (item) {
const url = isOldFormat ? item : (item.url || item);
const filename = isOldFormat ? '' : (item.filename || '');
console.log('Downloading:', { url, filename });
setTimeout(download.bind(null, url, filename), 100 * ++delay);
});
}