public FullTextContract GetTextResourceVersion(long textVersionId, [FromQuery] TextFormatEnumContract?format) { m_authorizationManager.AuthorizeResourceVersion(textVersionId, PermissionFlag.ReadProject); if (format == null) { format = TextFormatEnumContract.Html; } var result = m_projectContentManager.GetTextResourceVersion(textVersionId, format.Value); return(result); }
public IActionResult GetImageVersion(long imageVersionId) { m_authorizationManager.AuthorizeResourceVersion(imageVersionId, PermissionFlag.ReadProject); var result = m_projectContentManager.GetImageResourceVersion(imageVersionId); if (result == null) { return(NotFound()); } return(File(result.Stream, result.MimeType, result.FileName, result.FileSize)); }