public static async Task <FileSource> SaveBlockBlob(string entityItemId, FileSource file)
        {
            if (!string.IsNullOrWhiteSpace(file.FilePath ?? ""))
            {
                await blobContainer.CreateIfNotExistsAsync();

                string fileExtension = Path.GetExtension(file.FilePath);
                var    blobName      = $"{entityItemId.ToString()}/{file.Text}{fileExtension}";

                var blockBlob = blobContainer.GetBlockBlobReference(blobName);

                await blockBlob.UploadFromFileAsync(file.FilePath);

                //await blockBlob.UploadFromByteArrayAsync(MemoryStream(file.FilePath), 0, blob.Length);

                File.Delete(file.FilePath);

                return(ReturnFileSource(blockBlob));
            }

            return(null);
        }
        public static FileSource ReturnFileSource <T>(T blob) where T : ICloudBlob
        {
            if (ImageExtensions
                .Contains(Path.GetExtension(blob.Uri.ToString()).ToUpperInvariant()))
            {
                var file = new FileSource
                {
                    Text  = blob.Name,
                    Image = ImageSource.FromUri(blob.Uri)
                };

                return(file);
            }
            else
            {
                var file = new FileSource
                {
                    Text  = blob.Name,
                    Image = ImageSource.FromResource("EnterpriseAddLogs.Images.VideoIcon.png")
                };

                return(file);
            }
        }