-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigator.storage (OPFS) access #4137
Comments
@chfaft - If I understand correctly, you need an office-js event to know before an attachment is uploaded, and after attachment is uploaded. Is that right? |
Hi @ajays-msft - Thanks for your reply. We actually need to modify the content of files before the upload and after the download. The files can theoretically be much bigger than the memory of the user. Therefore we currently use OPFS to save them temporary, which seems to be not available in the Outlook-JS-Sandbox. This process happens completely independend of the Outlook attachments, so it does not have anything to do with Outlook attachments events. The problem so far is that we get a code snippet like this not running:
|
@chfaft - Will it help if you have an event before attachment is added, and in the event office-js gives a link to file, you then upload the file to the server, encrypt there and add it back to the email? This is not a feature we have currently, but I want to understand if that will help you. |
@ajays-msft - Thanks for your message! Your suggestion would simplify things, but we really need to have this action done on client side for security reasons. Encryption on server side is unfortunately no option in this case. |
@chfaft Are you having issue with windows Outlook client or Outlook web? What is the error you see for your code snippet with the navigator.storage? |
@zhngx1 It turned out that the File API is a possible approach to deal with this issue, as it allows the interception of file uploads in the way we would need. We have not done our tests with really big files yet, but as for now this way seems to be a suitable approach for our needs. |
This forum is limited to supporting office-js apis. Since this is out of scope of office js, closing it. |
We are about to create an Outlook Add-In that should be able to encrypt large files before uploading and optionally be able to decrypt them after downloading. The technology in charge is Navigator.storage (OPFS) which allows to save files on the local filesystem which allows us to use the local harddrive as intermediate memory before and after the encryption/decryption. As the JavaScript engine in Outlook runs in a sandbox, we have not found a way so far to do this operation in the Outlook and web context.
Do you see any chance to use this feature in another way or does any plan exist to intercept uploads and downloads for AddIns?
The text was updated successfully, but these errors were encountered: