Reputation: 23
If I call System.Net.WebClient.UploadFile(fileUrl, "DELETE", localFileName)
, is the file at localFileName
actually uploaded to the server? Is there a better way to accomplish this?
Upvotes: 2
Views: 5327
Reputation: 292345
I had a quick look at the WebClient
code with Reflector, and it seems to upload the file even if the method is DELETE. I think a better way of doing this would be to use an HttpWebRequest
explicitly, where you can specify the method without uploading the file
Upvotes: 4