CLOUDCRUISE UNITED

Binary File Download Test

Tests multiple download methods with a known 1KB binary file. Each file should start with bytes: 50 4b 03 04 (PK header). After downloading, check with: xxd file.xls | head -3

If corrupted, you will see ef bf bd (UTF-8 replacement chars) in the hex dump.

JavaScript downloads (fetch + blob/text)

Client-side generated downloads

Edge cases

Download all at once

Verification

After downloading, run on the worker:

for f in ~/Downloads/*.xls ~/Downloads/*.xlsx ~/Downloads/*.bin; do
  [ -f "$f" ] || continue
  echo "=== $(basename $f) ==="
  xxd "$f" | head -2
  echo "efbfbd count: $(xxd "$f" | grep -c 'efbf bd')"
  echo "size: $(wc -c < "$f")"
  echo
done

Expected clean first line: 504b 0304 0405 0607 0809 0a0b 0c0d 0e0f

All files should be exactly 1024 bytes and have 0 efbfbd matches (except test 6 which is intentionally corrupted).