Aspose words with net core

Hey,
I have working project that gets a doc and convert it to HTML in .net and iam trying to migrate my project to .net core.

My code .net core code:

[HttpPost, Route("api/docToHtml")]
public JObject DocToHtml(List<IFormFile> files)
{
    using (var postFIle = new MemoryStream())
    {
        files[0].CopyTo(postFile);
        Document doc = new Document(postFile);
   }
}

When iam calling new Document(postFIle) on any doc file Iam getting the exception:

Aspose.Words.FileCorruptedException ‘The document appears to be corrupted and cannot be loaded’.

Inner Exception
NullReferenceException: Object reference not set to an instance of an object

@Jopa,

Please ZIP and upload your input documents (you are getting this problem with) here for testing. We will investigate the issue on our end and provide you more information.

it happens with any doc file…
still adding an example that doesnt work

Example doc.zip (8.6 KB)

@Jopa,

Thanks for your inquiry. After an initial test with latest version of Aspose.Words for .NET i.e. 18.3, we were unable to reproduce this issue on our end. Please try running the following .NET Core 2.0 Console application on your end,

DotNetCoreApp.zip (234.9 KB)