如何直接从 InfoPath 表单打开附件?
如果可能的话,我想直接从 InfoPath 表单打开附件。
我注意到,在 Web 浏览器中查看 InfoPath 表单时,我单击蓝色回形针附件图标,会看到三个选项 - 附加、下载和删除(请参阅屏幕 拍摄)。然而,当我在 InfoPath 的预览环境中打开 InfoPath 表单时,我会获得更多选项 - 附加、打开、另存为和删除(请参阅屏幕 拍摄)。是否有办法在网络浏览器中提供此“打开”选项?
编辑:或者也许有一种方法可以以编程方式获取附件的 base64 编码字符串?文件附件控件是否有任何类型的单击事件?我知道我可以添加一个按钮,使用按钮的单击事件并以这种方式获取 base64 字符串,但我不想添加任何额外的 UI 元素。
I would like to open an attachment directly from an InfoPath form, if possible.
I notice when viewing an InfoPath form in a web browser, I click the blue paperclip attachment icon, I am given three options—Attach, Download, and Remove (see screen shot). Yet when I open an InfoPath form in InfoPath's Preview environment, I get more options—Attach, Open, Save As, and Remove (see screen shot). Is there anyway to get this "Open" option available in the web browser?
Edit: Or perhaps there is a way to get the attachment's base64 encoded string programmatically? Does the File Attachment control have any kind of click event? I know I could add a button, use the button's click event and grab the base64 string that way, but I don't want to add any additionally UI elements.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信附件控件有单击事件,只有按钮。
另外,请记住,对于 WEB 版本,即使您可以获取附件字段的值(如您所说的 base64 编码),您也无法在本地编写它或生成一个进程来“打开”它,除非形式具有充分的信任。
通过网络实现完全信任所需的签名和/或安装比获取字段值并保存/打开它的代码复杂得多。在花费太多时间寻找解决方案之前,不要忘记评估该方面。
I don't believe the attachement control has a click event, only the button.
Also, keep in mind that for the WEB version, even though you can grab the value of the attachment field (base64 encoded as you said) you won't be able to write it locally or spawn a process to "open" it unless the form has full trust.
The signing and/or install needed for full trust over the web is by far more complicated than the code to get the field value and save/open it. Don't forget to evaluate that aspect before spending too much time on a solution.