public static HttpFileCollectionBase ToFileCollection(this NCMIS.ObjectModel.ContentStream contentStream) { CmisHttpFileCollectionWrapper fileCollection = new CmisHttpFileCollectionWrapper(); fileCollection.AddFile(contentStream.Id, contentStream.ToHttpPostedFile()); return(fileCollection); }
public CmisHttpPostedFileWrapper(NCMIS.ObjectModel.ContentStream contentStream) { this.contentLength = contentStream.Length.HasValue ? (int)contentStream.Length.Value : 0; this.contentType = contentStream.MimeType; this.fileName = contentStream.Filename; this.inputStream = new MemoryStream(contentStream.Stream); }
public override NCMIS.ObjectModel.CmisObject CreateDocument(string repositoryId, NCMIS.ObjectModel.CmisProperties properties, string folderId, NCMIS.ObjectModel.ContentStream contentStream, VersioningState versioningState, string[] policies, NCMIS.AccessControl.AccessControlList addACEs, NCMIS.AccessControl.AccessControlList removeACEs) { DocumentObjectService documentService = (DocumentObjectService)ObjectService.GetService(typeof(ContentBase)); return(documentService.CreateDocument(repositoryId, properties, folderId, contentStream)); }
public override NCMIS.ObjectModel.TokenedDocumentId SetContentStream(string repositoryId, string documentId, NCMIS.ObjectModel.ContentStream contentStream, bool?overwriteFlag, string changeToken) { IObjectService objectService = ObjectService.GetService(documentId); objectService.SetContentStream(repositoryId, documentId, contentStream, overwriteFlag); return(new NCMIS.ObjectModel.TokenedDocumentId() { ChangeToken = changeToken, DocumentId = documentId }); }
public static HttpPostedFileBase ToHttpPostedFile(this NCMIS.ObjectModel.ContentStream contentStream) { return(new CmisHttpPostedFileWrapper(contentStream)); }