Made sha1 optional in endPutFile(...).