…rs that need to be url encoded (#1605)
fix(bucket): url encode new_name parameter in move_blob()
The move_blob() method was not URL encoding the new_name parameter
before passing it to the API call, unlike how the blob encodes its own
path. This caused failures when moving blobs to paths with special
characters.
Added URL encoding for new_name to match the blob path encoding, as
both names must fit in the API URL format:
"{blob_path}/moveTo/o/{new_name}"
Here's an example of what fails:
```python
from google.cloud import storage
gcs = storage.Client()
bucket = gcs.bucket("")
blob = bucket.get_blob("test/blob.csv")
bucket.move_blob(
blob,
new_name="test/blob2.csv"
)
```
Fixes #1523
---------
Co-authored-by: Chandra Shekhar Sirimala <chandrasiri@google.com>
No description provided.