I am trying to upload the files from GitHub repo to Azure file share and created shell script to run the AZ command like AZ login, create storage directory(if it not present) and finally Upload file to file share commands.
az login -u <username> -p <password>
az storage directory create --name 'abc' --share-name 'xyz'
az storage file upload-batch --destination my store/myshare --source resources --account-name myaccount --account-key 00000000.
After ran above command, we are able to upload the JSON file into file share . But the file was uploaded as a string format.
Sample JSON:
{
"source": "ABC"
}
Getting the below error, when I was select file and edit the file in file share.
"{\n \"source\": \"ABC\" \n}"
I ran above shell script on ubuntu server.
If I am trying to upload the same file manually/ az storage file upload command
in file share, file uploaded without any format issue.
Kindly help me.