mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 17:05:24 +02:00
fix: update dropbox sharing link to the new version
This commit is contained in:
+6
-1
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user