async Task ExecuteUploadFileCommand() { if (IsBusy) { return; } IsBusy = true; Uri storageUri = null; try { // Xamarin Media Plugin to get a picture await CrossMedia.Current.Initialize(); var file = await CrossMedia.Current.PickPhotoAsync(); // Get the storage token from the custom API var storageToken = await cloudService.GetStorageToken(); storageUri = new Uri($"{storageToken.Uri}{storageToken.SasToken}"); // Store the MediaFile to the storage token var blob = new CloudBlockBlob(storageUri); var stream = file.GetStream(); await blob.UploadFromStreamAsync(stream); UserDialogs.Instance.SuccessToast("File Upload Complete", null, 1500); } catch (Exception ex) { UserDialogs.Instance.Alert(storageUri.ToString(), ex.Message, "OK"); } finally { IsBusy = false; } }