I am using the library MPXJ which works great but I now want the ability for users to upload their own file (asp.net-mvc site) and it comes on the server side form post as a HttpPostedFileBase and I then I convert to a memory stream using:
var stream = new MemoryStream();
httpPostedFile.InputStream.CopyTo(stream);
Given that, I am trying to figure out how i can read it in as a MemoryStream (versus a file location on disk)
Right now I have something like this:
public ProjectFile Import(string filePathandName)
{
MPPReader reader = new MPPReader();
ProjectFile project = reader.read(filePathandName);
and i wanted to have something like this:
public ProjectFile Import(MemoryStream stream)
{
MPPReader reader = new MPPReader();
ProjectFile project = reader.read(stream);
Is this possible "natively" or do i need to save the file on my server and then read in from there (trying to avoid that option)?