ConvertAPI / convertapi-library-dotnet

A .NET library for the ConvertAPI
https://www.convertapi.com
Other
22 stars 8 forks source link

non-Async ConvertFile method throws an exception #48

Closed tomasr78 closed 1 year ago

tomasr78 commented 1 year ago

The non-Async ConvertFile method throws an exception when the file is a stream.

var convertApi = new ConvertApi("xxx");

Stream stream = new MemoryStream();

using (FileStream file = new FileStream("demo.pdf", FileMode.Open, FileAccess.Read))
    file.CopyTo(stream);

FileInfo jpg = convertApi.ConvertFile("pdf", "jpg", new ConvertApiFileParam(stream, "test_2.pdf"));

FileStream fileStream = jpg.OpenRead();
tomasr78 commented 1 year ago

The non-async methods were removed https://github.com/ConvertAPI/convertapi-dotnet/issues/49