Skip to content

Add script for uploading JSON files to Cloudflare R2#42

Merged
marcarl merged 1 commit intomainfrom
add-json-upload-script
Jan 7, 2026
Merged

Add script for uploading JSON files to Cloudflare R2#42
marcarl merged 1 commit intomainfrom
add-json-upload-script

Conversation

@marcarl
Copy link
Copy Markdown
Collaborator

@marcarl marcarl commented Jan 7, 2026

Summary

Adds a new script scripts/upload_json_to_r2.py for manually uploading SFS JSON files to the Cloudflare R2 sfs-json bucket.

Changes

  • New Python script for R2 upload operations
  • Environment variable validation for R2 credentials
  • AWS CLI configuration and management
  • Bulk JSON file upload with proper headers (content-type, cache-control)
  • Upload summary generation with metadata

Usage

# Using default directory (../sfs-jsondata)
python scripts/upload_json_to_r2.py

# Using custom directory
python scripts/upload_json_to_r2.py --json-dir data/sfs_json

Requirements

  • AWS CLI installed (pip install awscli)
  • R2 credentials configured in environment variables

🤖 Generated with Claude Code

Adds upload_json_to_r2.py script that uploads SFS JSON files to the
sfs-json bucket in Cloudflare R2. The script includes:
- Environment variable validation
- AWS CLI configuration for R2
- Bulk upload of JSON files with proper content-type and caching headers
- Upload summary generation

This enables manual uploads of JSON data to R2 storage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@marcarl marcarl merged commit bd64c16 into main Jan 7, 2026
5 checks passed
@marcarl marcarl deleted the add-json-upload-script branch January 7, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant