在哪里存储 Outlook Web App 的较大数据? [英] Where to store larger data for Outlook Web App?

查看:94
本文介绍了在哪里存储 Outlook Web App 的较大数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Outlook Web App 开发我的第一个加载项.我不清楚应该在哪里存储用户提供的较大数据块(例如,大块文本、图像)并与加载项关联(而不是属于特定邮件项目).

我的印象是 RoamingSettings 应该用于相对较小的东西,因此不太适合.我可以将数据存储在 OneDrive 上,但我不想在加载项 UI 之外向用户公开数据.我找到了 this SO entry 但答案似乎是更适用于桌面 Outlook,而不是 OWA.如果需要,我想我可以将数据存储在我自己的服务器上,但我首先想知道 OWA 架构中是否已经有一些东西可以用于此目的.

解决方案

RoamingSettings 是存储应用程序/用户设置/数据的默认选择,但是每个设置可以使用 32K 的限制,所有使用的设置总共可以使用 2MB通过您的加载项.另一种方法是使用 EWS 在隐藏文件夹中创建消息并将您的数据存储在消息正文中.

我创建了一个实现,将 XML 序列化为隐藏的消息并返回到 JavaScript 对象.您可以在此处查看我的文章(包含 GitHub 中的示例应用程序和源代码),了解如何操作:

https://blogs.msdn.microsoft.com/mvpawardprogram/2016/01/26/unifying-your-web-dev-skills-for-office-add-ins/

I am developing my first add-in for the Outlook Web App. It's not clear to me where I should store larger pieces of data provided by the user (e.g., big chunks of text, images) and to be associated with the add-in (as opposed to belonging to a particular mail item).

My impression is that RoamingSettings is supposed to be for relatively small stuff, and therefore not a good fit. I could store the data on OneDrive, but I prefer not to expose the data to the user outside of the add-in UI. I found this SO entry but the answer seems to be more applicable to desktop Outlook, not OWA. I suppose I could store the data on my own server if I need to, but I first I want to know if there's already something in the OWA architecture that would serve this purpose.

解决方案

RoamingSettings is the default choice for storing application/user settings/data, but there is a 32K limit that can be used per setting and 2MB total for all settings used by your add-in. An alternative approach is to use EWS to create a message in a hidden folder and store your data in the message body.

I created an implementation that serializes XML into the hidden message and back into JavaScript objects. You can see my article here (with sample app and source code in GitHub) on how to do it:

https://blogs.msdn.microsoft.com/mvpawardprogram/2016/01/26/unifying-your-web-dev-skills-for-office-add-ins/

这篇关于在哪里存储 Outlook Web App 的较大数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆