Uploading objects
Once we have created one or more containers, we can start uploading objects to them. While OpenStack Object Storage does not support nested containers, we can simulate folders or file directories with object names. This presents similar structure to the pseudo-folders we used in container names and both achieve similar end goals to a user expecting a tree-like structure to their object storage use.
Getting ready
Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment as a user with the swiftoperator
privileges. We will use the developer
user created in the Common OpenStack identity tasks recipe in Chapter 2, The OpenStack Client, with the cookbook4
password; we have also granted this user swiftoperator
privileges.
Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack command-line client.
How to do it…
To upload objects to an OpenStack Object Storage container, follow the...