ninefold/libcloud — pull request #1 by freakboy3742 (2012-07-20 05:58:40+00:00)
Title: Ensure that content type is preserved during streaming upload to atmos.

When you upload a file using upload_object(), the file/object name is interrogated to determine the mime type, and that mime type is then used when transferring the file.

However, if you upload using streaming upload, the mime type isn't set on the uploaded object.

This is important because if the mime type isn't provided, later downloads are all encoded application/octet-stream, which means the browser can only respond by downloading the object.

This patch replicates the behaviour of the base upload_object method, interrogating the file name for a mime type, and setting it on upload.