06-17-2014 07:38 AM
01-25-2016 06:50 AM
IDictionary<string, object> DocumentProperties = new Dictionary<string, object>();
DocumentProperties[PropertyIds.Name] = FileName;
DocumentProperties[PropertyIds.ObjectTypeId] = "cmis:document";
Stream temp = new MemoryStream(content);
ContentStream contentStream = new ContentStream();
contentStream.FileName = FileName;
contentStream.MimeType = "image/jpeg";
contentStream.Length = content.Length;
contentStream.Stream = new MemoryStream(content);
IDocument doc = documentTypeFolderRef.CreateDocument(DocumentProperties, contentStream, DotCMIS.Enums.VersioningState.Major);
01-29-2016 10:58 AM
08-31-2016 02:02 AM
Document doc = ((Document)session.GetObjectByPath(path));
IContentStream bla = doc.GetContentStream();
byte[] b = null;
using (MemoryStream ms = new MemoryStream())
{
int count = 0;
do
{
byte[] buf = new byte[1024];
count = bla.Stream.Read(buf, 0, 1024);
ms.Write(buf, 0, count);
} while (bla.Stream.CanRead && count > 0);
b = ms.ToArray();
}
SaveFileDialog sfd = new SaveFileDialog();
if (sfd.ShowDialog() == true)
File.WriteAllBytes(sfd.FileName, b);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.