From e2c732e9a61629a64921a48968d1d2c3267638e7 Mon Sep 17 00:00:00 2001 From: Athanasios Karmas <karmas@athenarc.gr> Date: Tue, 13 Jul 2021 10:02:03 +0000 Subject: [PATCH] Delete upload_to_s3_api.sh --- upload_to_s3_api.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 upload_to_s3_api.sh diff --git a/upload_to_s3_api.sh b/upload_to_s3_api.sh deleted file mode 100644 index 617c09b0..00000000 --- a/upload_to_s3_api.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# about the file -file_to_upload=$1 -bucket=$2 -filepath="/${bucket}/${file_to_upload}" - -# metadata -contentType="application/x-compressed-tar" -dateValue=`date -R` -signature_string="PUT\n\n${contentType}\n${dateValue}\n${filepath}" - -#s3 keys -s3_access_key=$3 -s3_secret_key=$4 - -#prepare signature hash to be sent in Authorization header -signature_hash=`echo -en ${signature_string} | openssl sha1 -hmac ${s3_secret_key} -binary | base64` - -# actual curl command to do PUT operation on s3 -curl -X PUT -T "${file_to_upload}" \ - -H "Host: object.cscs.ch:443/${bucket}" \ - -H "Date: ${dateValue}" \ - -H "Content-Type: ${contentType}" \ - -H "Authorization: AWS ${s3_access_key}:${signature_hash}" \ - https://object.cscs.ch/${bucket}/${file_to_upload} -- GitLab