fix warning, update build.gradle, build.sbt (#11896)

This commit is contained in:
William Cheng
2022-03-18 09:50:05 +08:00
committed by GitHub
parent fa9c7a669b
commit a4d320489d
15 changed files with 35 additions and 25 deletions

View File

@@ -1398,9 +1398,11 @@ public class ApiClient {
File file = (File) param.getValue();
addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
} else if (param.getValue() instanceof List) {
List<File> files = (List<File>) param.getValue();
for (File file : files) {
addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
List list = (List) param.getValue();
for (Object item: list) {
if (item instanceof File) {
addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item);
}
}
} else {
Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");