Skip to content

Commit 9e863de

Browse files
authored
[AppService] Fix #32044: az functionapp deployment source config-zip: Fix uploaded blob not containing content (#32119)
1 parent 2ced00c commit 9e863de

File tree

1 file changed

+6
-1
lines changed
  • src/azure-cli/azure/cli/command_modules/appservice

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,12 @@ def progress_callback(current, total):
16661666
progress_message = 'Uploading {} {}%'.format(progress_bar, percents)
16671667
cmd.cli_ctx.get_progress_controller().add(message=progress_message)
16681668

1669-
blob_client = container_client.upload_blob(blob_name, src, validate_content=True, progress_hook=progress_callback)
1669+
blob_client = None
1670+
import os
1671+
with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs:
1672+
zip_content = fs.read()
1673+
blob_client = container_client.upload_blob(blob_name, zip_content, validate_content=True,
1674+
progress_hook=progress_callback)
16701675

16711676
now = datetime.datetime.utcnow()
16721677
blob_start = now - datetime.timedelta(minutes=10)

0 commit comments

Comments
 (0)