Hello,
I follow the link and created arrange this code.
problem is how to pass fileupload path
string accountname = "amimageblob";
string accesskey = "24ssGQO/eCaMSS7E9VdIwFraydt8rhjYK0ZbbQhj2RCs6MXwgN/U7Kcbmmv5rtqOQ9jde1P4oFrUfUtQXldm/g==";
StorageCredentials creden = new StorageCredentials(accountname, accesskey);
CloudStorageAccount acc = new CloudStorageAccount(creden, useHttps: true);
CloudBlobClient client = acc.CreateCloudBlobClient();
CloudBlobContainer cont = client.GetContainerReference("mysample");
cont.CreateIfNotExists();
cont.SetPermissions(new BlobContainerPermissions
{
PublicAccess = BlobContainerPublicAccessType.Blob
});
CloudBlockBlob cblob = cont.GetBlockBlobReference("Sampleblob.jpg");
using (Stream file = System.IO.File.OpenRead(@ "D:\amit\Nitin sir\Nitinpandit.jpg"))
{
cblob.UploadFromStream(file);
}