Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awscli: Create directory prefix first before uploading object #236

Merged
merged 1 commit into from
Nov 24, 2017

Conversation

harshavardhana
Copy link
Member

Fixes #231

Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments

if [ $rv -eq 0 ]; then
function="${AWS} s3api put-object --body ${MINT_DATA_DIR}/datafile-1-MB --bucket ${bucket_name} --key prefix/directory/datafile-1-MB"
touch /tmp/zero-byte-file
function="${AWS} s3api put-object --body /tmp/zero-byte-file --bucket ${bucket_name} --key prefix/directory/"
Copy link
Contributor

@nitisht nitisht Nov 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put-object with no --body works as well. I mean ${AWS} s3api put-object --bucket ${bucket_name} --key prefix/directory/

else
# if make_bucket fails, $bucket_name has the error output
out="${bucket_name}"
fi

# if make bucket succeeds upload a file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment can be updated

@harshavardhana
Copy link
Member Author

Fixed and updated @nitisht @krisis

Copy link
Contributor

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally with S3/GCS gateway works fine

@nitisht nitisht merged commit ba3a201 into minio:master Nov 24, 2017
@harshavardhana harshavardhana deleted the fix-test branch November 24, 2017 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants