fix: update dropbox sharing link to the new version

This commit is contained in:
Christian Vidal Wolf
2026-04-22 16:17:07 +02:00
parent eec500f737
commit 81f0e76c3b
2 changed files with 15 additions and 3 deletions
+6 -1
View File
@@ -61,10 +61,15 @@ export default function App() {
if (isDev) {
const cacheBuster = `t_${Date.now()}`;
const fileUrl = `/dropbox-file/scl/fi/ulcgt5iyyvrkeynprhali/Data-Matrix.xlsx?rlkey=i9p9xgwzm0fr7jip91vxdeal5&st=k8jmibh4&dl=1&${cacheBuster}=${Date.now()}`;
const fileUrl = `/dropbox-file/scl/fi/8qbl7uoigtfu5x1nn8wvm/Data-Matrix.xlsx?rlkey=s6rkwa2bjrx9gh442gw6w40uk&dl=1&${cacheBuster}=${Date.now()}`;
console.log('Fetching Data-Matrix.xlsx from Dropbox (hard refresh)...');
const response = await fetch(fileUrl, { cache: 'no-store' });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const contentType = response.headers.get('content-type');
if (contentType && contentType.includes('text/html')) {
throw new Error('Dropbox returned an HTML page instead of the Excel file. This usually means the sharing link has expired or requires manual interaction. Please generate a new "Copy Link" from Dropbox.');
}
const arrayBuffer = await response.arrayBuffer();
if (arrayBuffer.byteLength < 100) throw new Error('File too small');