theguywhosucks commited on
Commit
d63df2f
·
verified ·
1 Parent(s): 0796265

Upload 17 files

Browse files
Files changed (1) hide show
  1. dashboardlogic.js +1 -1
dashboardlogic.js CHANGED
@@ -427,7 +427,7 @@ async function downloadFile(id) {
427
  password: currentPassword,
428
  filename: file.name,
429
  }));
430
- const fileUrl = result.data[0];
431
  if (typeof fileUrl === 'string' && (fileUrl.startsWith('http') || fileUrl.startsWith('https'))) {
432
  // Fetch as blob to force download, with optional Hugging Face token
433
  const hfToken = sessionStorage.getItem('hf_read_token');
 
427
  password: currentPassword,
428
  filename: file.name,
429
  }));
430
+ const fileUrl = Array.isArray(result.data) ? result.data[0] : result.data;
431
  if (typeof fileUrl === 'string' && (fileUrl.startsWith('http') || fileUrl.startsWith('https'))) {
432
  // Fetch as blob to force download, with optional Hugging Face token
433
  const hfToken = sessionStorage.getItem('hf_read_token');