Add restore from SSH

This commit is contained in:
2024-07-31 22:32:07 +02:00
parent 6976bf7597
commit 5b0d450740
9 changed files with 47 additions and 27 deletions

View File

@@ -59,7 +59,8 @@ func UploadFileToS3(filePath, key, bucket, prefix string) error {
return err
}
objectKey := fmt.Sprintf("%s/%s", prefix, key)
objectKey := filepath.Join(prefix, key)
//fmt.Sprintf("%s/%s", prefix, key)
buffer := make([]byte, fileInfo.Size())
file.Read(buffer)
@@ -93,7 +94,7 @@ func DownloadFile(destinationPath, key, bucket, prefix string) error {
}
defer file.Close()
objectKey := fmt.Sprintf("%s/%s", prefix, key)
objectKey := filepath.Join(prefix, key)
downloader := s3manager.NewDownloader(sess)
numBytes, err := downloader.Download(file,