Use Swift to manage large files
If you want to upload large files but do not want to incorporate our code into an application, you might find it easier to use the Swift tool for your uploads and management.
If you are using the tool, the process looks as follows:
The following code uploads large_file to test_container in 10 MB segments and then creates the manifest file so the segments can be downloaded as one.
swift upload test_container -S 10485760 large_file
You can change the size of the segments are by changing the value
The following code downloads the large file as a single object:
swift download test_container large_file
In the above example, Swift will upload all the segments into a second
container named test_container_segments. These segments will have
names using the format of
The main benefit for using a separate container is so the main container will not be polluted with all the segment names. The naming format is so that an upload of a new file with the same name won’t overwrite the contents of the first until the last moment when the manifest file is updated.
For more information on using the swift tool, see the OpenStack Swift documentation.
Continue the conversation in the Rackspace Community.
©2017 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License