overwrite files (image) and delete image in c#?

后端 未结 3 587
陌清茗
陌清茗 2021-01-24 22:21

I have a simple form which the users can use to upload images. It has a preview button so when User selects an image and clicks on preview, a postback occurs and I save the imag

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-24 22:48

    The exception talks for itself : Your file is still being used/opened by another process, i.e. thread, that you have launched. I bet it is the process by which you open the image file for reading. Make sure you have closed the relevant stream, ten bucks that it will solve your issue.

提交回复
热议问题