I am having problem with this Line of Code.
entity.addPart("file", new FileBody(new File(loadedData.getData().getPath())));
This is a part of it.
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
entity.addPart("file", new FileBody(new File(loadedData.getData().getPath())));
I am not getting any error that I am doing something wrong here but in the log cat.
07-19 16:09:12.424 140-493/? E/﹕ AudioCloseDumpPCMFile file== NULL
I am getting this
If I comment out the addpart for file. The rest of my entity part goes no problem and I was able to push it through. Problem is the file. I have loaded the loadedData
from an Intent Image picker and that is what I want to include.
Update
/document/image:11018 is what I am getting from loadedData.getData().getPath()
I have tried to create a new File instead of inserting it into FileBody like this
File file = loadedData.getData().getPath()
Now I am getting invalid type. As it requires java.io.file and of course I am sending a String.
So I am really not familiar turning an Intent to a file data.