I have used the bunch of code below.
MultipartEntity me = new MultipartEntity();
me.addPart("applicationKey", new StringBody("11111111111"));
me.addPart("clientCode", new StringBody("100"));
me.addPart("userEmail", new StringBody(strMyAdress));
me.addPart("friendEmail0", new StringBody(strFriendAdress));
me.addPart("fromAndroid",new StringBody (Android));
Log.i("TestPathkkkkkkk", strAttachedFile);
me.addPart("videoFile", new FileBody(new File(strAttachedFile)));
me.addPart("static_url",new StringBody (link));
To try to upload all the above parameters to a php script using:
HttpPost httppost = new HttpPost("http:/blah/blah/blah.php");
It seems to accept everything in the post except for the FileBody. The strAttachedFile in
me.addPart("videoFile", new FileBody(new File(strAttachedFile)));
is the directory path to a video on the phone.
I use logcat to make sure the path is correct.
When i run script to upload, this is what log cat returns: INFO/TestPathkkkkkk(21987): /mnt/sdcard/DCIM/100MEDIA/VIDEO0111.3gp
But on the PHP script side it only shows the video name and not the full directory.
Anyways long story short, I was wondering if there is anyway to httppost to php script without using Multipartentity?
Thanks, in advance.