Fix contentType request parameter in UploadTerminologyCommand (#5639)
This commit is contained in:
parent
51a6ddad3d
commit
250bc7b031
|
@ -36,6 +36,7 @@ import org.apache.commons.cli.CommandLine;
|
|||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.io.input.CountingInputStream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -268,7 +269,7 @@ public class UploadTerminologyCommand extends BaseRequestGeneratingCommand {
|
|||
|
||||
byte[] bytes = theBytes;
|
||||
String fileName = theFileName;
|
||||
String suffix = fileName.substring(fileName.lastIndexOf("."));
|
||||
String suffix = FilenameUtils.getExtension(fileName);
|
||||
|
||||
if (bytes.length > ourTransferSizeLimit) {
|
||||
ourLog.info(
|
||||
|
|
|
@ -388,7 +388,6 @@ public class UploadTerminologyCommandTest {
|
|||
},
|
||||
"-t", theIncludeTls, myBaseRestServerHelper
|
||||
));
|
||||
UploadTerminologyCommand uploadTerminologyCommand = new UploadTerminologyCommand();
|
||||
|
||||
verify(myTermLoaderSvc, times(1)).loadCustom(any(), myDescriptorListCaptor.capture(), any());
|
||||
|
||||
|
|
Loading…
Reference in New Issue