def put(self, f, digest=None):
if digest:<EOL><INDENT>actual_digest = digest<EOL><DEDENT>else:<EOL><INDENT>actual_digest = self._compute_digest(f)<EOL><DEDENT>created = self.conn.client.blob_put(self.container_name,<EOL>actual_digest, f)<EOL>if digest:<EOL><INDENT>return created<EOL><DEDENT>return actual_digest<EOL>
Upload a blob

:param f:
    File object to be uploaded (required to support seek if digest is
    not provided).
:param digest:
    Optional SHA-1 hex digest of the file contents. Gets computed
    before actual upload if not provided, which requires an extra file
    read.
:return:
    The hex digest of the uploaded blob if not provided in the call.
    Otherwise a boolean indicating if the blob has been newly created.