Related command
az storage blob upload --data @-
Describe the bug
Gzip output is getting mangled when piping to azure upload blob command. No such issue if I split the the command, save the gziped file locally and then upload the file without the pipe. I'm pretty sure it has something to do with encoding getting mangled.
To Reproduce
- Have any file, for example - test.sql
- Run similar command to this:
cat test.sql | gzip | az storage blob upload --data @- -n test.sql.gz --account-name "$ACCOUNT" --container-name "$CONTAINER" --sas-token "$SAS_TOKEN
- Afterwards download the uploaded file from Azure Storage, attempt to un-compress it
zcat test.sql.gz
gzip: test.sql.gz: not in gzip format
Expected behavior
Gzip output can be piped to azure upload blob command without corrupting data.
Environment summary
OS - Debian 10
azure-cli - 2.42.0
Related command
az storage blob upload --data @-Describe the bug
Gzip output is getting mangled when piping to azure upload blob command. No such issue if I split the the command, save the gziped file locally and then upload the file without the pipe. I'm pretty sure it has something to do with encoding getting mangled.
To Reproduce
zcat test.sql.gz gzip: test.sql.gz: not in gzip formatExpected behavior
Gzip output can be piped to azure upload blob command without corrupting data.
Environment summary
OS - Debian 10
azure-cli - 2.42.0