// with session id
parts = new Part[3];
parts[0] = new StringPartNoTransferEncoding("sid", sid);
parts[1] = new StringPartNoTransferEncoding(
"ImportExportPassword", "");
parts[2] = new FilePart("ConfigImportFile",
uploadFile.getName(), uploadFile);
} else {
// old style, no session id
parts = new Part[2];
parts[0] = new StringPartNoTransferEncoding(
"ImportExportPassword", "");
parts[1] = new FilePart("ConfigImportFile",
uploadFile.getName(), uploadFile);
}
mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost
.getParams()));