Skip to content

Commit

Permalink
Merge pull request #2323 from opencb/TASK-4843
Browse files Browse the repository at this point in the history
TASK-4843 - CLI Fails uploading file
  • Loading branch information
juanfeSanahuja authored Sep 27, 2023
2 parents 29104d2 + 8c4e7a9 commit 3c931ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public CustomFilesCommandExecutor(ObjectMap options, String token, ClientConfigu

public RestResponse<File> upload() throws Exception {
// ObjectMap params = new ObjectMap()
options.append("fileFormat", ParamUtils.defaultString(String.valueOf(options.get("fileFormat")), File.Format.UNKNOWN.toString()))
.append("bioformat", ParamUtils.defaultString(String.valueOf(options.get("bioformat")), File.Bioformat.UNKNOWN.toString()));
options.append("fileFormat", options.getString("fileFormat", File.Format.UNKNOWN.toString()))
.append("bioformat", options.getString("bioformat", File.Bioformat.UNKNOWN.toString()));
// //If the DEPRECATED parameter fileFormat has set we only override it if the new parameter format is also set
// params.append("fileFormat", ParamUtils.defaultString(commandOptions.format, params.getString("fileFormat")));
// params.putIfNotEmpty("study", commandOptions.study);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ protected <T> RestResponse<T> callUploadRest(WebTarget path, Map<String, Object>
client.property(ClientProperties.READ_TIMEOUT, DEFAULT_UPLOAD_TIMEOUT);
path.register(MultiPartFeature.class);
path.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.CHUNKED);

final FileDataBodyPart filePart = new FileDataBodyPart("file", new File(filePath));
FormDataMultiPart formDataMultiPart = new FormDataMultiPart();
// Add the rest of the parameters to the form
Expand Down

0 comments on commit 3c931ca

Please sign in to comment.