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

Add success action status to PresignedPostPolicy #784

Merged
merged 2 commits into from
Aug 10, 2019

Conversation

sinhaashish
Copy link
Contributor

Parameter added to set success-action-status for making PresignedPostPolicy request.

The generated curl command :

curl -X POST  -F bucket=testbucket -F x-amz-date=20190804T172411Z -F success_action_status=201 -F x-amz-signature=c9358c3dc8c5e23b451c1a248f6523e44daeb1a01bd63999b3f389e6a8345fc4 -F key=my-objectname -F x-amz-algorithm=AWS4-HMAC-SHA256 -F Content-Type=image/png -F x-amz-credential=Q3AM3UQ867SPQQA43P2F/20190804/us-east-1/s3/aws4_request -F policy=eyJleHBpcmF0aW9uIjoiMjAxOS0wOC0xMVQxNzoyNDoxMC4xNzNaIiwiY29uZGl0aW9ucyI6W1siZXEiLCIkYnVja2V0IiwidGVzdGJ1Y2tldCJdLFsiZXEiLCIka2V5IiwibXktb2JqZWN0bmFtZSJdLFsiZXEiLCIkQ29udGVudC1UeXBlIiwiaW1hZ2UvcG5nIl0sWyJlcSIsInN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyIsIjIwMCJdLFsiZXEiLCIkeC1hbXotYWxnb3JpdGhtIiwiQVdTNC1ITUFDLVNIQTI1NiJdLFsiZXEiLCIkeC1hbXotY3JlZGVudGlhbCIsIlEzQU0zVVE4NjdTUFFRQTQzUDJGLzIwMTkwODA0L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QiXSxbImVxIiwiJHgtYW16LWRhdGUiLCIyMDE5MDgwNFQxNzI0MTFaIl1dfQ== -F file=/home/ashish/Pictures/test.png https://play.min.io:9000/testbucket 

The XML received :

<?xml version="1.0" encoding="UTF-8"?>
<PostResponse><Bucket>testbucket</Bucket><Key>my-objectname</Key><ETag>&#34;d1237fb44ada3718026aeafc725e8402&#34;</ETag><Location>https://play.min.io:9000/testbucket/my-objectname</Location></PostResponse>

Closes #782

@sinhaashish sinhaashish force-pushed the set-success-status-action branch from fe86bcc to 8ab440b Compare August 6, 2019 05:12
@sinhaashish sinhaashish force-pushed the set-success-status-action branch from 8ab440b to cb71969 Compare August 7, 2019 05:31
Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

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

How about we update the docs in API.md as well.

Rest of the code is working LGTM

@sinhaashish sinhaashish force-pushed the set-success-status-action branch from cb71969 to b3d0e5b Compare August 7, 2019 08:09
@sinhaashish
Copy link
Contributor Author

sinhaashish commented Aug 7, 2019

How about we update the docs in API.md as well.

Updated it.

Copy link
Contributor

@poornas poornas left a comment

Choose a reason for hiding this comment

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

LGTM

@poornas
Copy link
Contributor

poornas commented Aug 8, 2019

@sinhaashish , travis failures on this.

@sinhaashish
Copy link
Contributor Author

@sinhaashish , travis failures on this.

restarted the job and it passes.

@kannappanr
Copy link
Contributor

ping @harshavardhana

@harshavardhana harshavardhana merged commit 322b6ef into minio:master Aug 10, 2019
@sinhaashish sinhaashish deleted the set-success-status-action branch December 20, 2019 04:04
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.

PostPolicy not implements SetSuccessStatusAction?
4 participants