Save and OneDrive

Update: might leave this in case anyone can shed any light, I have moved this to using a mapped network drive so the results can be viewed, and that seems okay so I have a solution…


so ... I'm probably asking for trouble here! I am using Presentation as part of a .netcore WebApp deployed to IIS In the code I open a presentation, manipulate it, then save it to a new name.

My IIS setup has a symlink folder that points to a real OneDrive folder.
Problem is … after the same, it looks like the file isn’t being released, as it never syncs (and sometimes opening it, PPT says it’s read only).

also had problems writing to the same output file if I switch between debugging (VS-Code/Kestrel) and running the ‘live’ IIS site, which is why I’m guessing there’s a file handle getting held onto somewhere.

Hi Jeremy,

How exactly were you saving to the OneDrive folder?

Anyway, note that with GemBox.Presentation you can save your file into a MemoryStream, after that you can export that in-memory file to some output path however you want.

But I believe that it’s someone else that is locking the file, you’ll probably notice that after you export the MemoryStream to that same location. The stream that GemBox.Presentation creates when using PresentationDocument.Save(string) is being disposed.

Regards,
Mario

yeah, I think it’s a OneDrive weirdness rather than Gembox.Presentation … that fact it works with regular files properly makes me think I need to explore some more (may be something weird going on with our OneDrive/Sharepoint setup)
thanks for confirming though :slight_smile: