Closed gyeadon closed 6 years ago
I just grabbed the code and stepped through it out of curiosity... Basically, a local instance of HtmlImageInfo is passed to the ProvisionImage event handler. The handler sets the RawData through the Provision method. But then the method ImageProvisioningProvider.Provision checks a different instance of HtmlImageInfo, where the RawData will always be null in this case.
Hello Gyeadon,
Thank you for your troubleshooting. I have just pushed a new nuget version. There is such a gap between 1.5 and 2.0.0 that it don't worth to stick with that old one :)
That's working perfectly now. Thank you!
Hi, just thought I'd report my finding... I've just tried v2.0 coming from v1.5. Everything works the same for my purposes except for manual image provisioning. In v1.5 I can set the image data in my ProvisionImage event handler as follows: e.Data = File.ReadAllBytes(filepath); In v2.0 the syntax has changed, so it now looks like this: e.Provision(File.ReadAllBytes(filepath)); The old version works but the new version does not with the same HTML source and image URL and data. If I disable the manual provisioning then the automatic HTTP retrieval works fine in either version. This isn't a big problem for me - I could just use the automatic HTTP download or stick with v1.5.