Created
October 10, 2024 23:15
-
-
Save djouallah/6d8200dd9c69dadf47daadd8ec6c348f to your computer and use it in GitHub Desktop.
This file contains 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
import boto3 | |
s3_resource = boto3.resource('s3', | |
region_name = "us-east-1" , | |
endpoint_url = "zzzzzzzzzzzzzzzzzzzz" , | |
aws_access_key_id = "uuuuuuuuuuuuuuuuuu", | |
aws_secret_access_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
) | |
bucket_name = "uuuuu" | |
bucket = s3_resource.Bucket(bucketName) | |
for file in files_to_upload: | |
print('upload to R2 '+file) | |
bucket.upload_file(file, file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment