0

I have a dll to which I have no source code. This has a method that accepts httppostedfile as an input. I wanted to pass a local file stream to this method.

Is it possible somehow to convert the local file stream or bytes to httppostedfile format? An explicit castings does not work.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
pessi
  • 681
  • 1
  • 10
  • 26
  • You'll probably have to write your own conversion code. – Tim Jul 08 '15 at 19:03
  • 1
    This topic was discussed here: http://stackoverflow.com/questions/1920977/creating-an-instance-of-httppostedfile-with-reflection and http://stackoverflow.com/questions/5514715/how-to-instantiate-a-httppostedfile – Marcin Zablocki Jul 08 '15 at 20:32
  • 2nd link solved the problem. Thank you. – pessi Jul 10 '15 at 21:10

0 Answers0