Skip to content

Supported a list of files in multipart form data#633

Merged
symphony-elias merged 1 commit intofinos:mainfrom
symphony-elias:PLAT-11827
Mar 11, 2022
Merged

Supported a list of files in multipart form data#633
symphony-elias merged 1 commit intofinos:mainfrom
symphony-elias:PLAT-11827

Conversation

@symphony-elias
Copy link
Copy Markdown
Contributor

Description

Closes #631

Checklist

  • Referenced an issue in the PR title or description
  • Filled properly the description and dependencies, if any
  • Unit/Integration tests updated or added
  • [N/A] Javadoc added or updated
  • [N/A] Updated the documentation in docs folder

@symphony-elias symphony-elias requested a review from a team as a code owner March 10, 2022 16:09

private void addFileToFormParam(String paramKey, File paramValue, MultiValueMap<String, Object> formValueMap) {
File file = paramValue;
formValueMap.add(paramKey, new FileSystemResource(file));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this file get stored in the machine?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file has to be stored on the machine and accessible by the Java process running this.
I guess your question is: does the file get closed after HTTP request is made. I have to check that.

Copy link
Copy Markdown
Contributor

@symphony-youri symphony-youri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 put a description in the commit message to give a bit of context

The HttpClient provided by the BDK was not supporting File objects as a form param value
whether it was one single File object or several File objects for a given form param key
@symphony-elias symphony-elias merged commit 601d37e into finos:main Mar 11, 2022
@symphony-elias symphony-elias deleted the PLAT-11827 branch March 11, 2022 16:57
@symphony-elias symphony-elias mentioned this pull request Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limitation for multipart/form-data form

4 participants