Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer for multipart/form-data #921

Open
GraphZal opened this issue Nov 16, 2023 · 3 comments
Open

Serializer for multipart/form-data #921

GraphZal opened this issue Nov 16, 2023 · 3 comments
Labels
answered? Waiting for confirmation that the issue is solved docs Related to documentation only knowledge 🤯 Learn about common {plumber} problems type: question Poses a question, not a problem

Comments

@GraphZal
Copy link

I am currently writing function to validate data from a .xlsx file. This validation creates a simple list containing the rules violated, as well as another excel file with a detailed report that shows which rows break which rules and why.
I'd like to turn that function into an API endpoint, so my users can trigger the validation themselves. The API endpoint should return both, the simple list (probably as a json object), as well as the detailed report file.
In short, I'd like to return a multipart/form-data response from my API endpoint, which does not yet seem to be supported in Plumber.

Other people also seem to have need for something similar, see e.g. Return JSON and RData from an endpoint or Plumber returning multiple images in one response?.

Therefore, I'd like to request the addition of a multipart/form-data serializer to Plumber.

@meztez
Copy link
Collaborator

meztez commented Nov 16, 2023

@GraphZal The simplest way is to return them in a single zip archive. The browser does not know what to do with multipart/form-data response.

@meztez
Copy link
Collaborator

meztez commented Nov 16, 2023

Note, as_attachment, support multi files or object, return zip?

@meztez
Copy link
Collaborator

meztez commented Nov 16, 2023

@meztez meztez added type: question Poses a question, not a problem docs Related to documentation only answered? Waiting for confirmation that the issue is solved knowledge 🤯 Learn about common {plumber} problems labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered? Waiting for confirmation that the issue is solved docs Related to documentation only knowledge 🤯 Learn about common {plumber} problems type: question Poses a question, not a problem
Projects
None yet
Development

No branches or pull requests

2 participants