Skip to content

Commit

Permalink
Merge pull request #210 from Targoman/illegal_instruction_bug_in_stor…
Browse files Browse the repository at this point in the history
…e_to_s3

empty bucket not set
  • Loading branch information
kambizzandi authored Sep 7, 2022
2 parents ccb8f26 + 93dbc48 commit c7cfd7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Interfaces/ObjectStorage/Gateways/gtwAWSS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool gtwAWSS3::storeFile(
QString SecretKey = MetaInfo[AWSS3MetaInfoJsonKey::SecretKey].toString();

TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__);
Aws::Auth::AWSCredentials AWSCredentials(AccessKey.toStdString(), SecretKey.toStdString());
Aws::Auth::AWSCredentials AWSCredentials(AccessKey.toStdString().c_str(), SecretKey.toStdString().c_str());

TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__);
Aws::Client::ClientConfiguration S3ClientConfig;
Expand All @@ -84,7 +84,7 @@ bool gtwAWSS3::storeFile(
S3ClientConfig.connectTimeoutMs = 1000;

TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__);
S3ClientConfig.endpointOverride = _uploadGateway.ugwEndpointUrl.toStdString();
S3ClientConfig.endpointOverride = _uploadGateway.ugwEndpointUrl.toStdString().c_str();
// S3ClientConfig.enableHostPrefixInjection = false;
// S3ClientConfig.enableEndpointDiscovery = false;

Expand All @@ -103,11 +103,12 @@ bool gtwAWSS3::storeFile(
S3::Model::PutObjectRequest Request;

TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__);
Request.SetBucket(_uploadGateway.ugwBucket.toStdString());
if (_uploadGateway.ugwBucket.isEmpty() == false)
Request.SetBucket(_uploadGateway.ugwBucket.toStdString().c_str());

QString Key = QString("%1/%2").arg(_path).arg(_fileName);
TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__ << Key);
Request.SetKey(Key.toStdString());
Request.SetKey(Key.toStdString().c_str());

TargomanLogDebug(5, "*** gtwAWSS3::storeFile: #" << __LINE__);
Request.SetACL(S3::Model::ObjectCannedACL::public_read);
Expand Down
2 changes: 1 addition & 1 deletion Interfaces/ObjectStorage/ObjectStorageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ quint64 ObjectStorageManager::saveFile(
if (QueueRowsCount > 0) {
TargomanLogDebug(5, "before queue ObjectStorageManager::processQueue(fileID: " << UploadedFileID << ")");

#if 0
#if 0==0
QFuture<bool> ret = QtConcurrent::run(
ObjectStorageManager::processQueue,
stuProcessQueueParams(
Expand Down

0 comments on commit c7cfd7d

Please sign in to comment.