1

ByteArrayDataSource datasource = new ByteArrayDataSource(in, "multipart/form-data"); MimeMultipart multipart = new MimeMultipart(datasource);

int count = multipart.getCount();
log.debug("count " + count);
for (int i = 0; i < count; i++) {
    BodyPart bodyPart = multipart.getBodyPart(i);
    if (bodyPart.isMimeType("multipart/mixed")) {
        log.info("multipart/mixed" + bodyPart.getContentType());
        processMultipart(bodyPart.getContent());
    } else if (bodyPart.isMimeType("application/json")) {
     
       
    } else {
        log.warn("default " + bodyPart.getContentType());
    }
}
Andrej Istomin
  • 2,527
  • 2
  • 15
  • 22
Sharath K
  • 11
  • 2

0 Answers0