0

Okay so i have code that uploads images

WebClient client = new WebClient();
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
client.UploadFile("Address/upload.php", "POST", @"C:\Test\test.jpg");

For example, the file name will be dynamic and could be anything, so how do i send an image to server and then save it basically through a php script

lee
  • 41
  • 3
  • 1
    It is not entirely clear what you are asking. Are you asking about how to implement the PHP side of *receiving* the file? – Timwi Sep 12 '10 at 20:41
  • BTW the Content-Type of a .jpg file is `image/jpeg`, not `application/x-www-form-urlencoded`. – dtb Sep 12 '10 at 20:41
  • Let me guess... your next question is how to take a screenshot using C#, right? – dtb Sep 12 '10 at 20:43
  • hehe no i have the screenshots and all that thanks :) but yes the php side, ill change the content type thanks – lee Sep 12 '10 at 21:30

0 Answers0