c# - Usage of Stream more than once -


i trying upload image file repository using httppostedfile.inputstream , resize different thumbnail sizes using same stream.

  • step 1. using stream sm = httppostedfile.inputstream able upload file successfully.
  • step 2. use same stream resize image different sizes. error saying stream being used.

suppose if skip step 1 , perform step 2, able resize inputstream (images) different size. letting me use inputstream once.

how can achieve process both step 1 , 2 sequentially ?

i did try storing inputstream variable , used separate copy each step no luck.

can suggest/help me ?

thank

you did set stream.position 0 before reusing it?

by storing in multiple variables you're duplicating reference same object in memory.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -