diff --git a/minio_upload/mpv-shot0001.jpg b/minio_upload/mpv-shot0001.jpg deleted file mode 100644 index 4d76097..0000000 Binary files a/minio_upload/mpv-shot0001.jpg and /dev/null differ diff --git a/minio_upload/upload.py b/minio_upload/upload.py deleted file mode 100644 index 556f051..0000000 --- a/minio_upload/upload.py +++ /dev/null @@ -1,31 +0,0 @@ -import requests -import shutil - -host = 'https://aic-fun-bucket-2020.s3.amazonaws.com/' -remote_filename = 'testing2.jpg' - -url = host + remote_filename - -local_filename = 'mpv-shot0001.jpg' - -headers = {'Content-Type': 'image/jpeg'} - -# PUT image named 'mpv-shot0001.jpg' to 'testing2.jpg' -r = requests.put(url, data=open(local_filename, 'rb'), headers=headers) - -if r.status_code == 200: - print("Successfully uploaded a file!") -else: - print("Something went wrong") - exit() - -r = requests.get(url, stream=True) -if r.status_code == 200: - with open('file_downloaded.jpg', 'wb') as f: - r.raw.decode_content = True - shutil.copyfileobj(r.raw, f) - print("Successfully downloaded the file and saved it in 'file_downloaded.jpg'") -else: - print("Something went wrong while downloading the file!") - exit() - \ No newline at end of file