Sicos1977 / MsgKit

A .NET library to make MSG files without the need for Outlook
199 stars 55 forks source link

Possibility to save file in Sharepoint online - Improvement #99

Closed AhmedMunawar closed 1 year ago

AhmedMunawar commented 1 year ago

Hi, thank you for the tool, I want to save the msg file into sharepoint online instead of local drive, right now we are using Openmcdf (Compound File) including multiple streams in a single storage contains, can you suggest how can I convert the end result to stream byte I am little confused because of multiple streams, I already have functionality implemented to upload file in sharepoint. do you have any suggestions ? appreciate in advanced.

Sicos1977 commented 1 year ago

Hi,

At the moment I'm not behind my computer but if i remember correctly I implemented an option to save the msg file to a file or to a stream. So if this is correct then save it to a memorystream and then use the ToArray method on that object to convert it to a byte array of that is what you need.

If you have any other questions I will answer them tomorrow because it is already evening overhere

AhmedMunawar commented 1 year ago

Hi, Thank you very much for your prompt response, I try to investigate but I cant find that option, I saw we have writeToStorage Method which write all the properties in rootstorage and at the end Saves the in-memory image of Compound File to a file (msg). I am following CET timezone, when you get chance please give me the reference of class or method. I saw the converter class but it need different arguments.