az storage blob upload --data @- does not work

Copper Contributor

This works:

echo "Test" > test.txt
az storage blob upload --blob-url 'https:...' ...  --file test.txt

 

This does not, all other arguments the same

echo "Test" | az storage blob upload --blob-url 'https:...' ... --data @-

I have tried this in WSL, PowerShell and CMD, all give the same error:

Argument '--data' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
expected str, bytes or os.PathLike object, not NoneType

 

I really need this to work.

This is in

az cloud set --name AzureUSGovernment

with

az version

{
"azure-cli": "2.56.0",
"azure-cli-core": "2.56.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

 

1 Reply

@KEnglishIPTA 

 

Believe it is related to 'preview' and not fully support yet, like --tag hit the bug:

 

https://github.com/Azure/azure-cli/issues/23536