Hi Guys,
I am trying to upload blob to container which has sub folders in it using powershell.
Here is my code:-
Connect-AzureRmAccount
$Keys = Get-AzureRmStorageAccountKey -ResourceGroupName $rgname -Name $storagename
$keys.Item(0).Value
$StorageContext = New-AzureStorageContext -StorageAccountName - $storagename StorageAccountKey $Keys.Item(0).value;
$UploadFile = @{
Context = $StorageContext;
Container = 'landing-area';
File = $file;
}
Set-AzureStorageBlobContent @UploadFile -Force;
So my container name is 'landing-area' and it has multiple sub-folders inside of it.
I want to upload my blobs in one of those folder but i cant seem to get it right
when i replace Container with 'landing-area/test' it throws me error as:
Set-AzureStorageBlobContent : Container name 'landing-area/Test' is invalid.
Valid names start and end with a lower case letter or a number and has in
between a lower case letter, number or dash with no consecutive dashes and is
3 through 63 characters long.
Can anyone please help how can i achieve this?
Thanks,
Ashish