Skip to content

Conversation

@chrisyeh96
Copy link
Contributor

This pull request proposes a fix for issue #12563

Consider a blob URL: 'https://lilablobssc.blob.core.windows.net/nacti-unzipped/part0/sub000/2010_Unit150_Ivan097_img0003.jpg'

Before this fix, from_blob_url() would incorrectly parse

  • blob_name: '2010_Unit150_Ivan097_img0003.jpg'
  • container_name: 'sub000'

This fix correctly parses the url as

  • blob_name: 'part0/sub000/2010_Unit150_Ivan097_img0003.jpg'
  • container_name: 'nacti-unzipped'

However, I believe my "fix" might be incomplete. In particular, it may not work for Azure Blob Storage accounts hosted on custom endpoints. As I was unable to find adequate documentation on how custom endpoints should be parsed, I did not consider this case. See the existing unit test here: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/storage/azure-storage-blob/tests/test_blob_client.py#L432-L439

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jul 16, 2020
@xiafu-msft
Copy link
Contributor

Hi @chrisyeh96

Thanks so much for this pr! I opened another pr with CI passed, #12619 it should be able to fix your problem.
Would you mind if we close this pr?

@chrisyeh96
Copy link
Contributor Author

Thanks @xiafu-msft. Looking forward to your fix making it into a release!

@chrisyeh96 chrisyeh96 closed this Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants