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

Is any way to set metadata of an object? #2

Open
gzeureka opened this issue Mar 12, 2012 · 5 comments
Open

Is any way to set metadata of an object? #2

gzeureka opened this issue Mar 12, 2012 · 5 comments

Comments

@gzeureka
Copy link

Is any way to set metadata of an new object when put it into a bucket , or set metadata of an existing object?

@weavejester
Copy link
Owner

Not yet. Patches to add this functionality are welcome.

@mjg123
Copy link

mjg123 commented Jul 20, 2012

Do you have any ideas how this might work? I'd like to be able to set the metadata on put, so I imagine something like:

 (s3/put-object cred bucket key {:content file-or-stream-or-something
                                 :metadata {:content-type content-type}})

would be appropriate, as it matches the get-object response format. I'm happy to add this and send you a pull request but don't want to start off on the wrong path.

@mjg123
Copy link

mjg123 commented Jul 20, 2012

Oh, I see you can actually do this with:

 (s3/put-object cred bucket key value {:content-type content-type})

but the docs (http://weavejester.github.com/clj-aws-s3/aws.sdk.s3.html#var-put-object) are at 0.3.0 when the lib is at 0.3.2

@gzeureka
Copy link
Author

That's great! Now we can set metadata when putting new object into bucket.
And is there something like set-object-metadata that can set metadata of an existing object?

@CampingScorpion
Copy link

My pull request (#16) allows get-object to pull down any user metadata as well.

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

4 participants