Download URL incorrect if we need to authorize
When trying to download a B2 file using the Client::download function, I've noticed that we can overwrite the hostname we're connecting to, leaving just the path.
cURL will then correctly complain that an invalid URL is given. That's because we're asking for /b2api/v1/b2_download_file_by_id?whatever instead of https://xxxx.backblazeb2.com/b2api/v1/b2_download_file_by_id?whatever
I think that I only see this because I'm passing in an invalid token, but I think the bug is still valid.
To fix this, I think we need to change src/Client.php's download function and move $this->authorizeAccount() above the if (isset($options['FileId'])) and $requestOptions = [ ... ] blocks. authorizeAccount can set the class's downloadUrl and authToken variables, and we're relying on these in this function.
Hi @bittylicious would https://github.com/gliterd/backblaze-b2/pull/61 solve this problem? It sets the download url properly by calling authorizeAccount first.