I want to upload files (text and binary) from my local machine running ubuntu 20.04 to a Minio storage container also in the same machine.
below are the variables for the files
here is my code
below are the variables for the files
local_path = /usr/carte/proftpd/aws01y minio_path = original/tza/a S3_BUCKET_INCOMING = 'Data-incoming'my problem is where should i define the local_path and mino_path inside my code so that python will know where to file the files and where to put them
here is my code
import glob import sys from minio import Minio local_path = sys.argv[1] minio_path = sys.argv[2] filepaths = glob.glob(local_path) if len(filepaths) == 0: print(f'No files found for pattern={local_path}') S3_ENDPOINT = 'http://localhost:9000' S3_USER = 'Tzabox' # replace with the value of STORAGE_PASSWORD in your .env file S3_PASSWORD = '******' S3_BUCKET_INCOMING = 'Data-incoming' if S3_ENDPOINT != '': endpoint = '' if S3_ENDPOINT.startswith('https://'): is_secure = True endpoint = S3_ENDPOINT.replace('https://', '') else: is_secure = False
buran write Dec-22-2023, 10:15 AM:
S3 Password replaced with asterisks. Anyway I would replace it if I were you.
S3 Password replaced with asterisks. Anyway I would replace it if I were you.
buran write Dec-22-2023, 08:04 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.