private void EditDocument(int attachment_id, HttpContext context) { var mail_box_manager = new MailBoxManager(0); var file = mail_box_manager.GetMessageAttachment(attachment_id, TenantId, Username); var temp_file_url = MailStoragePathCombiner.GetPreSignedUrl(file); var editor_url = FilesLinkUtility.GetFileWebEditorExternalUrl(temp_file_url, file.fileName); editor_url = new UriBuilder(CommonLinkUtility.GetFullAbsolutePath(editor_url)).ToString(); context.Response.Redirect(editor_url, false); }
private void ViewDocument(int attachmentId, HttpContext context) { var mailBoxManager = new MailBoxManager(); var file = mailBoxManager.GetMessageAttachment(attachmentId, TenantId, Username); var tempFileUrl = MailStoragePathCombiner.GetPreSignedUrl(file); var viewerUrl = FilesLinkUtility.GetFileWebViewerExternalUrl(tempFileUrl, file.fileName); viewerUrl = new UriBuilder(CommonLinkUtility.GetFullAbsolutePath(viewerUrl)).ToString(); context.Response.Redirect(viewerUrl, false); }
private static void EditDocument(int attachmentId, HttpContext context) { var engine = new EngineFactory(TenantId, Username); var file = engine.AttachmentEngine.GetAttachment( new ConcreteUserAttachmentExp(attachmentId, TenantId, Username)); var tempFileUrl = MailStoragePathCombiner.GetPreSignedUrl(file); var editorUrl = FilesLinkUtility.GetFileWebEditorExternalUrl(tempFileUrl, file.fileName); editorUrl = new UriBuilder(CommonLinkUtility.GetFullAbsolutePath(editorUrl)).ToString(); context.Response.Redirect(editorUrl, false); }