I'm trying to upload a file to a server, but when I try to open the connection it fails and gives a FileNotFoundException, while the file is there. I my browser on my desktop it executes the php. This is my code:
URL url = new URL("http://www.test.com/files/upload_file.php");
connection = (HttpURLConnection) url.openConnection();
And this the error:
12-07 14:43:01.337: W/System.err(19473): java.io.FileNotFoundException: http://www.test.com/files/upload_file.php
12-07 14:43:01.347: W/System.err(19473): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)