|
@@ -8,10 +8,17 @@ bucket_target = 'my-bucket'
|
|
|
|
|
|
s3 = boto3.client('s3', use_ssl=False, endpoint_url="http://172.17.0.2:9000", aws_access_key_id="minio", aws_secret_access_key="miniokey")
|
|
|
|
|
|
-
|
|
|
-res = s3.upload_file('./test/data/hello.txt', bucket_target, 'coucou.txt')
|
|
|
-
|
|
|
|
|
|
|
|
|
listOfFiles = [f for f in os.listdir(folder_to_sync) if os.path.isfile(folder_to_sync + f)]
|
|
|
+print("Local : ", folder_to_sync)
|
|
|
print(listOfFiles)
|
|
|
+
|
|
|
+
|
|
|
+print("Uploading ...")
|
|
|
+for f in listOfFiles:
|
|
|
+ print(f)
|
|
|
+ res = s3.upload_file(folder_to_sync + f, bucket_target, f)
|
|
|
+
|
|
|
+print("Done")
|
|
|
+
|