Exemple #1
0
        }//end CaptureToFile

        /// <summary>
        /// Upload the Picture to Blob
        /// </summary>
        private async void UploadToBlob() //TODO: AndDeleteFile
        {
            //Upload to Azure Blob

            // User cancelled
            if (file == null)
            {
                return;
            }

            // Prepare the photo
            IRandomAccessStream irandom = await file.OpenAsync(FileAccessMode.Read);

            BitmapImage bitmapImage = new BitmapImage();
            await bitmapImage.SetSourceAsync(irandom);

            string faToken = null;

            faToken = Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.Add(file);

            // Set the Token and Add it to the list
            await AzureBlobService.UploadImageFromImageToken(faToken, fileNameWithType);


            //Delete the file
            //file.DeleteAsync();
            await CleanupCameraAsync();
        }