From 954e2213962c4f1f012aa8de9b8933c9a798f17c Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Sat, 7 Nov 2020 14:12:09 +0100 Subject: [PATCH] add endpoint url --- scripts/s3_media_upload | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/s3_media_upload b/scripts/s3_media_upload index cddfb41..8eaac9f 100644 --- a/scripts/s3_media_upload +++ b/scripts/s3_media_upload @@ -405,6 +405,12 @@ def main(): help="Deletes local copy from media store on succesful upload", ) + upload_parser.add_argument( + "--endpoint-url", + help="S3 endpoint url to use", + default=None + ) + args = parser.parse_args() if args.cmd == "write": @@ -432,7 +438,7 @@ def main(): if args.cmd == "upload": sqlite_conn = get_sqlite_conn(parser) - s3 = boto3.client("s3") + s3 = boto3.client("s3", endpoint_url=args.endpoint_url) run_upload( s3, args.bucket,