Browse Source

Specify that file list is local

DricomDragon 4 years ago
parent
commit
e9aafa7254
1 changed files with 7 additions and 4 deletions
  1. 7 4
      boto-updater.py

+ 7 - 4
boto-updater.py

@@ -5,18 +5,21 @@ import os.path
 folder_to_sync = './test/data'
 bucket_target = 'my-bucket'
 
-# Main
+# Create connection
 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")
 
+# Reset bucket
+
+
 # Get file list
 # Source : https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory
-file_list = os.listdir(folder_to_sync)
+local_file_list = os.listdir(folder_to_sync)
 print("Local : ", folder_to_sync)
-print(file_list)
+print(local_file_list)
 
 # Upload
 print("Uploading ...")
-for file_name in file_list:
+for file_name in local_file_list:
     print(file_name, end=' ')
 
     file_path = folder_to_sync + '/' + file_name