boto/boto — pull request #1099 by khagler (2012-11-07 04:33:02+00:00)
Title: Fix multipart uploads of very large files

While trying out glacier-cli I discovered that boto.glacier.vaut.create_archive_from_file didn't do any sanity-checking on file size, so uploads larger than 40,000 MB would fail. This checks to see if a file parameter is larger than that. If so, it checks to be sure the file isn't larger than Glacier's maximum (40,000 GB) and then determines the smallest allowable part size according to Amazon's rule (1 MB multiplied by a power of 2) that will fit the file to upload into the 10,000 part maximum, and uses that instead of the default.