I'm trying to upload some zip files to Azure blob storage using this script:
#!/bin/bash
# Sample script to upload a file to a BLOB container
if [ $# -eq 0 ]
then
echo "Please specify a filename"
exit 1
fi
# Required parameters
file_name=$1
azure_account=xxx
azure_key=xxx
container_name=xxx
blob_name=xxx
# Used by azure-cli
export AZURE_STORAGE_ACCOUNT=$azure_account
export AZURE_STORAGE_ACCESS_KEY=$azure_key
azure storage blob upload $file_name $container_name $blob_name
But whenever I run it I get:
sh upload-file.sh file.zip info: Executing command storage blob upload error: Cannot call method 'substr' of null info: Error information has been recorded to /home/usr/.azure/azure.err error:
storage blob upload command failed