Project

General

Profile

« Previous | Next » 

Revision 6680

View differences:

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