Home Ask Login Register

Developers Planet

Your answer is one click away!

Chris February 2016

Upload file to server that is open

So I'm using WebClient to upload a file to a server. It works great except for one problem. If the file is opened by another program then it will not upload. For instance, if it's a word document that's been saved but is still opened by word then it fails to upload. Is there a way to force it to read whatever is there and upload it?


Justin A February 2016

If i understand your question right then you can use this solution to test if the file is open and then close it if it is. It's a useful helper class i've used in the past.


Post Status

Asked in February 2016
Viewed 3,136 times
Voted 12
Answered 1 times


Leave an answer

Quote of the day: live life