protected override async Task OnItemSaved()
        {
            if (PictureData.Files.Any())
            {
                var file = PictureData.Files.First();
                using (var stream = await storage.GetFileAsync(file.FileId))
                {
                    facade.SaveImage(CurrentItemId, stream);
                }
            }

            await base.OnItemSaved();
        }
Beispiel #2
0
        protected override void OnItemSaved()
        {
            // TODO: this is not very efficient because we need two database queries
            if (PictureData.UploadedFiles.Any())
            {
                var file = PictureData.UploadedFiles.First();
                using (var stream = storage.GetFile(file.FileId))
                {
                    facade.SaveImage(CurrentItemId, stream);
                }
            }

            base.OnItemSaved();
        }