Beispiel #1
0
 def upload(local_file_path):
     remote_file_path = os.path.join(remote_dir, "downloads",
                                     os.path.basename(local_file_path))
     logger.info("Uploading {} ({}) to {}.".format(
         local_file_path, size_str(os.path.getsize(local_file_path)),
         remote_file_path))
     upload_local_to_remote(local_file_path, remote_file_path)
     return remote_file_path
Beispiel #2
0
 def upload(local_file_path):
     remote_file_path = os.path.join(remote_dir,
                                     config.DOWNLOADED_DATASETS_DIR,
                                     os.path.basename(local_file_path))
     logger.info(
         f"Uploading {local_file_path} ({size_str(os.path.getsize(local_file_path))}) to {remote_file_path}."
     )
     upload_local_to_remote(local_file_path, remote_file_path)
     return remote_file_path