Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Content-Encoding on Cloudfiles upload #64

Closed
wants to merge 45 commits into from

Conversation

joeshaw
Copy link
Contributor

@joeshaw joeshaw commented May 7, 2013

There doesn't appear to be any way to set Content-Encoding: gzip on uploaded files. In python-cloudfiles you can manually set headers on the storage object you get by calling container.create_object() before you call send() on it.

See http://docs.rackspace.com/files/api/v1/cf-devguide/content/Enabling_File_Compression_with_the_Content-Encoding_Header-d1e2198.html

EdLeafe and others added 30 commits March 27, 2013 21:16
fix(readme): Add a link to the pyrax docs at docs.rackspace.com.
Cloud networks docs reference wrong kwarg for cs.servers.create
Bring pyrax.utils._wait_until operations for cloud servers in alignment with other objects
…n code.

Added the utils.update_exc() method that allows additional text to be added to an exception before it is re-raised. Also added some code to catch the case where keyring_auth() is called with a username for which there is no stored password. Previously this would fail silently.
Previously if the call exceeded the number of attempts specified, it returned None. The default for the 'attempts' parameter
has also been changed to 0, meaning that by default wait_until() will loop infinitely until the desired value of the att is
reached.
@sivel
Copy link
Contributor

sivel commented May 7, 2013

pyrax utilizes python-swiftclient instead of python-cloudfiles (deprecated), however the client.put_object() method of swiftclient, does support a headers argument, so I imagine, it could be as simple as updating client.upload_file and client.store_object of pyrax.cf_wrapper to take an additional headers argument.

Added to both the client and container versions of these functions.
This is primarily to add support for setting Content-Encoding: gzip
to uploaded files.

See http://docs.rackspace.com/files/api/v1/cf-devguide/content/Enabling_File_Compression_with_the_Content-Encoding_Header-d1e2198.html
@joeshaw
Copy link
Contributor Author

joeshaw commented May 7, 2013

Oops, accidentally pushed to pull from master instead of working.

@joeshaw
Copy link
Contributor Author

joeshaw commented May 7, 2013

Unfortunately had to open a new pull request to get the branch right: #66.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants