Discussion:
Update a batch of S3 objects' metadata?
Rob Yurkowski
2013-06-14 19:22:47 UTC
Permalink
I know that this is a year late, but this topic was a pretty good help.
Still, I had some difficulties operating on a selection of those files, so
here's what I did to make it work:

https://gist.github.com/robyurkowski/5784487

Hopefully this will be helpful to someone in the future, too!
I need to change some metadata (Content-Type) on hundreds or thousands of
objects on S3. As far as I can tell there is no way to save only metadata
with fog, the entire object must be re-saved including the body. Is this
true?
Thanks!
John
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-06-14 19:39:49 UTC
Permalink
Thanks!
Post by Rob Yurkowski
I know that this is a year late, but this topic was a pretty good help.
Still, I had some difficulties operating on a selection of those files, so
https://gist.github.com/robyurkowski/5784487
Hopefully this will be helpful to someone in the future, too!
I need to change some metadata (Content-Type) on hundreds or thousands of
objects on S3. As far as I can tell there is no way to save only metadata
with fog, the entire object must be re-saved including the body. Is this
true?
Thanks!
John
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Rupak Ganguly
2013-06-14 22:55:41 UTC
Permalink
OpenStack have a post_object which is an update call and does not need a
body. Also preserves the existing metadata.

Does'nt S3 have a post_object API?

Thanks,
Rupak Ganguly
678-648-7434

On Jun 14, 2013, at 3:25 PM, Rob Yurkowski <rob-Fg+***@public.gmane.org> wrote:

I know that this is a year late, but this topic was a pretty good help.
Still, I had some difficulties operating on a selection of those files, so
here's what I did to make it work:

https://gist.github.com/robyurkowski/5784487

Hopefully this will be helpful to someone in the future, too!
I need to change some metadata (Content-Type) on hundreds or thousands of
objects on S3. As far as I can tell there is no way to save only metadata
with fog, the entire object must be re-saved including the body. Is this
true?
Thanks!
John
--
You received this message because you are subscribed to the Google Groups
"ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-06-17 16:59:49 UTC
Permalink
There isn't an explicit thing quite like that, I gather you can use copy to
write over the top of an existing thing in order to get this effect though.
See:
http://stackoverflow.com/questions/4754383/how-to-change-metadata-on-an-object-in-amazon-s3
Post by Rupak Ganguly
OpenStack have a post_object which is an update call and does not need a
body. Also preserves the existing metadata.
Does'nt S3 have a post_object API?
Thanks,
Rupak Ganguly
678-648-7434
I know that this is a year late, but this topic was a pretty good help.
Still, I had some difficulties operating on a selection of those files, so
https://gist.github.com/robyurkowski/5784487
Hopefully this will be helpful to someone in the future, too!
I need to change some metadata (Content-Type) on hundreds or thousands of
objects on S3. As far as I can tell there is no way to save only metadata
with fog, the entire object must be re-saved including the body. Is this
true?
Thanks!
John
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...