Azure-Samples/storage-blob-dotnet-getting-started

await blockBlob.UploadFromFileAsync(imageToUpload, FileMode.Open);

Opened this issue · 2 comments

This sample no longer works with the latest version of windowsazure.storage (v7) ... await blockBlob.UploadFromFileAsync(imageToUpload, FileMode.Open);

cannot convert from 'System.IO.FileMode' to 'System.Threading.CancellationToken'

I am also getting same issue. What is the alternative to this method?

The samples look correct now.
The method call has been replaced with the single parameter one
public virtual Task UploadFromFileAsync(string path);
Apparently there's been a major API change and the method taking two parameters changed from accepting a FileMode enum to a CancellationToken.