feat: Add 'Store for Later' async file transfer mode - #45
Open
lucamartinetti wants to merge 1 commit into
Open
Conversation
- Backend: S3-compatible storage with aws-sdk-s3
- Endpoints: POST/GET /api/store/{blob_id}, GET /api/store/{blob_id}/meta
- Rate limiting: 10 uploads/hour, 60 reads/hour per IP (in-memory)
- Hourly cleanup task for expired blobs (24h TTL)
- Frontend: New 'Store for Later' tab with age-encryption
- 4-word diceware passphrase generation (EFF wordlist)
- QR code generation for shareable links
- Blob ID derived via SHA-256(passphrase)
Config: S3_ENDPOINT, S3_BUCKET, S3_REGION, STORE_MAX_SIZE, STORE_TTL_HOURS
Known: Rate limiter is in-memory (needs Redis for multi-instance)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new "Store for Later" mode for async file transfers. Senders can upload E2E encrypted files to S3-compatible storage and share them via passphrase or QR code link. Recipients can download anytime within 24 hours.
Changes
Backend (Rust/Axum):
POST /api/store/{blob_id},GET /api/store/{blob_id},GET /api/store/{blob_id}/metaS3_ENDPOINT,S3_BUCKET,S3_REGION,STORE_MAX_SIZE,STORE_TTL_HOURSFrontend (Vanilla JS):
Configuration
Requires S3-compatible storage:
S3_ENDPOINT=https://... S3_BUCKET=... S3_REGION=auto STORE_MAX_SIZE=104857600 # 100MB default STORE_TTL_HOURS=24Known Issues
Testing
Manual testing recommended: