Support: 1-800-961-4454
Sales Chat
1-800-961-2888

Rackspace Cloud Files Launches Support for Custom Container Metadata

7

The Rackspace Cloud Files team is pleased to announce our support for custom container metadata.  Metadata can be attached to objects and now containers in order to categorize them and mark them with any sort of data.

If you’re new to Cloud Files, let me recap a few basic definitions.   An object is the basic storage entity and any optional metadata that represents the files you store in the Cloud Files system. When you upload data to Cloud Files, the data is stored and consists of a location (container), the object’s name, and any metadata consisting of key/value pairs.

The great news is that you have more options available now that we have launched custom container metadata.  For example, if you are using Cloud Files as the storage target for system backups, you might want to store the time of the backup as the container metadata or the origin of that backup.  You could even store whether that backup was full or incremental, which would help with restores later.

The uses for custom container metadata are simple but often key to implementation strategies for Cloud storage. Container metadata cannot be searched against or listed at this time, but will show up in any HEAD or GET request for a container.

Cloud Files users can set their container metadata by using the Cloud Files API.  Simply do a POST on the container with X-Container-Meta-<user-specified-name> headers.

If you have any questions or comments about this feature, we’re happy to hear them!

About the Author

This is a post written and contributed by Megan Wohlford.


More
7 Comments

Hello,

Now that you can set header values through the meta data. Is there any meta data that will set Content-Type, Content-Encoding and Expires headers? These are far more important.

What if the meta data we attach is private, can we prevent the header being sent. It would be better if you allowed:

[parameter-name] [value] [header-name(optional)]
Encoding gzip Content-Encoding
MyPrivateParam Test1 –
MyPublicParam Test2 X-PublicParam

Thanks
Scott

avatar Scott on March 20, 2011 | Reply

Scott- We support a lot of this today through our API. You can set the content type on objects when you load them into Cloud Files. If you need to change them, that’s a bit trickier, but you can work around it by using our copy function and resetting it then.

If you are serving your content publicly, you can set your expire header by setting your TTL, which actually sets the expire header and the cache control. You can do this in the Control Pandel and API.

Finally, you can set the content encoding header as of about two days ago :) We haven’t done a fancy announcement yet, but you can now do so via our REST API.

Hope that helps, let me know if I’m missing anything here…

avatar Megan Wohlford on March 21, 2011 | Reply

[…] content to remain encrypted all the way from the origin servers out to the browser •    Container MetaData – Metadata can be attached to objects and now containers in order to categorize them and mark […]

avatar Rackspace Cloud Computing & Hosting on April 27, 2011 | Reply

You said “…you can set the content encoding header as of about two days ago…”. Where can I find documentation on this – I can’t seem to see it anywhere.

avatar Neil Lamoureux on May 16, 2011 | Reply

I just read that Google could be getting into the wildcard SSL certificate business. I haven’t figured out how they can make money from free certificates, but this has to be troubling to any current SSL providers.

avatar UCC SSL Certificate on October 13, 2011 | Reply

Hi !

I have a lot of mp3 content already in the cloud that I would like to change from mime type audio/mp3 to audio/mpeg. Can you give me an idea of how what part of the api I can use:

1) to change existing mp3 mime types
2) to set the mime type correctly when uploading new mp3s

Thanks,

Brian

avatar Brian Kathler on January 17, 2013 | Reply

Hi Brian,

Using curl one can change the content type by sending a new header:

curl -i -X POST -H “x-auth-token: ” // -H ‘Content-Type: audio/mpeg’

Setting the content-type header can be done when you upload your audio files.

To fix existing files will require some scripting:

import cloudfiles

cf = cloudfiles.Connection(username=’username’, api_key=’apikei’)
my_audio = cf.get_container(‘my_container’)
for obj in my_audio.get_objects():
obj.content_type = ‘audio/mpeg’

That’s a rudimentary example of what you’d want to do, but please let us know if you have any questions.

avatar Jose Malacara [Racker] on January 28, 2013

Leave a New Comment

(Required)


Racker Powered
©2014 Rackspace, US Inc.