Skip to content

Commit 617ddcf

Browse files
authored
[Batch] Fix #32086, #32090: az batch application package create: Fix blob not being uploaded (#32106)
1 parent f7c9331 commit 617ddcf

4 files changed

Lines changed: 3576 additions & 232 deletions

File tree

src/azure-cli/azure/cli/command_modules/batch/custom.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ def _upload_package_blob(ctx, package_file, url):
376376
"""Upload the location file to storage url provided by autostorage"""
377377
BlobClient = get_sdk(ctx, ResourceType.DATA_STORAGE_BLOB, '_blob_client#BlobClient')
378378
blob_client = BlobClient.from_blob_url(url)
379-
blob_client.upload_blob(package_file)
379+
with open(package_file, "rb") as file:
380+
blob_client.upload_blob(data=file.read(), overwrite=True)
380381

381382

382383
@transfer_doc(ApplicationPackageOperations.create)

0 commit comments

Comments
 (0)