Revision 6680
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/client/MetacatClient.java | ||
---|---|---|
676 | 676 |
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); |
677 | 677 |
|
678 | 678 |
// For File parameters |
679 |
InputStreamBody content = new InputStreamKnownSizeBody(fileData, filename, size); |
|
679 |
InputStreamBody content = null; |
|
680 |
if (size < 0) { |
|
681 |
content = new InputStreamBody(fileData, filename); |
|
682 |
} else { |
|
683 |
content = new InputStreamKnownSizeBody(fileData, filename, size); |
|
684 |
} |
|
680 | 685 |
entity.addPart("datafile", content); |
681 | 686 |
|
682 | 687 |
//set up properties |
Also available in: Unified diff
allow unknown content sizes
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5543