如何将多个文件作为列表发送到MVC服务器?

时间:2019-06-24 09:04:27

标签: java android httpclient

我想从Android向我的MVC服务器应用程序发送多个图像。我知道如何发送单个文件,但是当我尝试发送多个图像时我卡住了。 这是我从android发送单个文件的方式

        MultipartEntity entity = new MultipartEntity();

    if (!file.isDirectory() && !imagePath.equals("")) {
        ContentBody cbFile = new FileBody(file, "image/jpeg");
        entity.addPart("image", cbFile);
    }

并在服务器中以

的形式接收
public void AddDocument(HttpPostedFileBase image)
    {
        //do something here
    }

Now i want to receive List of images like this

0 个答案:

没有答案