kamaji 1da3eea7b8 Fix upload stuck pending: validate blob readability before upload
iOS Safari can evict blob data from IndexedDB while keeping the Blob
reference intact (instanceof/size checks pass but actual data read
fails). This caused upload POST to throw 'Load failed' client-side,
never reaching the server, burning retries endlessly.

Changes:
- Add validateBlobReadable() that reads first byte to verify data access
- If blob is unreadable, mark as 'failed' immediately with clear message
- Re-read photo from IndexedDB before upload for fresh blob reference
- Capture detailed error name/type in catch for better diagnostics
- Bump SW cache versions to v14/v10 to force new code delivery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 15:56:06 -06:00

NextSnap

Offline-first photo capture web app for Nextcloud.

Quick Start

Development

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python run.py

Visit http://localhost:5000/api/health to verify the server is running.

Docker Deployment

export SECRET_KEY="your-secret-key-here"
export NEXTCLOUD_URL="https://your-nextcloud-instance.com"
docker-compose up -d

Architecture

  • Backend: Flask + Gunicorn
  • Frontend: Vanilla JavaScript (no framework)
  • Offline Storage: IndexedDB via Dexie.js
  • Service Worker: For offline-first capabilities
  • Nextcloud Integration: WebDAV API for file operations

Build Order

See nextsnap.md for the complete specification and phased implementation plan.

Description
No description provided
Readme 339 KiB
Languages
JavaScript 42.2%
HTML 29.1%
Python 21.6%
CSS 5.6%
Makefile 0.6%
Other 0.9%