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

后端 未结 3 581
陌清茗
陌清茗 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:54

    1. Make sure that your current process doesn't have a write handle open to the files in question
    2. If there are no handles then try turning off your virus scanner; an overly aggressive virus scanner could be taking a lock on those files just after they have been created. This might be preventing you from deleting the files.

提交回复
热议问题