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
Post a Comment