Skip to content

Instantly share code, notes, and snippets.

View r-a-o's full-sized avatar
🚩
time to create is now

Nagendra Rao r-a-o

🚩
time to create is now
View GitHub Profile
@r-a-o
r-a-o / upload_to_r2.py
Created October 8, 2024 08:03
Upload multiple files and folders(retaining structure) to Cloudflare R2 via Boto3 (takes confirmation before upload, shows upload progress, has ignore list)
import boto3
from botocore.config import Config
from boto3.s3.transfer import TransferConfig, S3Transfer
import argparse
import os
import sys
import threading
# Constants
GB = 1024 ** 3