upload_s3_2.py 405 B

123456789
  1. def upload_files(self):
  2. files = os.listdir(self.input_file)
  3. with progressbar.ProgressBar(max_value=len(files)) as bar:
  4. for indice, file in enumerate(files):
  5. pathFile = self.input_file+file
  6. keyFile = self.output + file
  7. self._S3.meta.client.upload_file(pathFile, self.bucket, keyFile)
  8. bar.update(indice+1)