hi,
i am trying to upload a file to server.i need to pass filename as well id in post method.
Below is my code
Code:
			httpcon=(HttpConnection)Connector.open("http://192.168.0.152/xyz/uploadSong?",Connector.READ_WRITE);
			httpcon.setRequestMethod(HttpConnection.POST);
			httpcon.setRequestProperty("Content-type","application/x-www-form-urlencoded");
			os=httpcon.openOutputStream();
			os.write(params.getBytes("utf-8"));
			httpcon.setRequestProperty("Content-type","audio/mpeg");
			fileis=getClass().getResourceAsStream("/sample.mp3");
			String data=fileis.toString()+"&output=json";
			os.write(data.getBytes());
			os.flush();
			os.close();

where as params parameter is for name and id.
so can anyone tell me what is the problem with this code.
thankx.