

def upload_file(self, file_or_path, obj_name=None, content_type=None, etag=None, return_none=False, content_encoding=None, ttl=None, content_length=None, headers=None):
    "\n        Uploads the specified file to this container. If no name is supplied,\n        the file's name will be used. Either a file path or an open file-like\n        object may be supplied. A StorageObject reference to the uploaded file\n        will be returned, unless 'return_none' is set to True.\n\n        You may optionally set the `content_type` and `content_encoding`\n        parameters; pyrax will create the appropriate headers when the object\n        is stored.\n\n        If the size of the file is known, it can be passed as `content_length`.\n\n        If you wish for the object to be temporary, specify the time it should\n        be stored in seconds in the `ttl` parameter. If this is specified, the\n        object will be deleted after that number of seconds.\n\n        The 'extra_info' parameter is included for backwards compatibility. It\n        is no longer used at all, and will not be modified with swiftclient\n        info, since swiftclient is not used any more.\n        "
    return self.create(file_or_path=file_or_path, obj_name=obj_name, content_type=content_type, etag=etag, content_encoding=content_encoding, headers=headers, content_length=content_length, ttl=ttl, return_none=return_none)

dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py Container.upload_file/original