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

S3 API does not save metadata during put-object #2092

Closed
bennykwok opened this issue May 27, 2021 · 1 comment
Closed

S3 API does not save metadata during put-object #2092

bennykwok opened this issue May 27, 2021 · 1 comment

Comments

@bennykwok
Copy link

aws --endpoint-url http://localhost:8333 --profile seaweedfs s3api put-object --bucket testing --key testing.jpg --body testing.jpg --metadata Width=1024,Height=768 --debug

PUT
/testing/testing.jpg
[skip some line]
x-amz-meta-height:1024
x-amz-meta-width:768

weed/s3api/s3api_object_handlers.go
line 39: func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request) {

    for k, v := range r.Header {
            glog.V(0).Infof("header %s: %s", k, v)
    }

==========
output:

I0527 20:37:00 55107 s3api_object_handlers.go:42] header X-Amz-Meta-Width: [1024]
I0527 20:37:00 55107 s3api_object_handlers.go:42] header0 X-Amz-Meta-Height: [768]

@chrislusf
Copy link
Collaborator

Fixed current code.

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

No branches or pull requests

2 participants