private MakuraDocument GetMakuraDocument(Document cmisDoc)
        {
            var content = new MakuraContentStream();
            content.FileName = cmisDoc.ContentStreamFileName;
            content.Length = cmisDoc.ContentStreamLength;
            content.MimeType = cmisDoc.ContentStreamMimeType;
            content.Stream = cmisDoc.GetContentStream().Stream;

            var doc = new MakuraDocument();
            doc.ContentStream = content;
            doc.Name = cmisDoc.Name;

            return doc;
        }
        private void Capture_Captured(object sender, WebPageCapturedEventArgs e) {
            var file = e.CapturedFile;

            using (var fileStream = file.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
                var content = new MakuraContentStream();
                content.FileName = file.Name;
                content.Length = fileStream.Length;
                content.MimeType = MimeMapping.GetMimeMapping(file.Name);
                content.Stream = fileStream;

                var doc = new MakuraDocument();
                doc.ContentStream = content;
                doc.Name = file.Name;

                var eventArgs = new MakuraDocumentEventArgs();
                eventArgs.UpdatedDocument = doc;
                eventArgs.Path = "/CaptureImages";

                Changed?.Invoke(this, eventArgs);
            }
        }