Fixed file upload
This commit is contained in:
parent
8ad285cd61
commit
99973b7c98
8 changed files with 61 additions and 51 deletions
|
|
@ -72,20 +72,13 @@ public class MultipartParser implements Iterable<MultipartField>{
|
|||
parseDelimiter(header.getHeader("Content-type")),
|
||||
Long.parseLong(header.getHeader("Content-Length")));
|
||||
}
|
||||
/* public MultipartParser(HttpServletRequest req) throws IOException {
|
||||
this(req.getInputStream(),
|
||||
parseDelimiter(req.getHeader("Content-type")),
|
||||
req.getContentLength());
|
||||
}
|
||||
*/
|
||||
|
||||
private static String parseDelimiter(String contentTypeHeader){
|
||||
String delimiter = contentTypeHeader.split(" *; *")[1];
|
||||
delimiter = delimiter.split(" *= *")[1];
|
||||
return delimiter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long getContentLength(){
|
||||
return contentLength;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue