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

Proposal: Support multipart/form-data in the watchdog #344

Closed
johnmccabe opened this issue Oct 26, 2017 · 2 comments
Closed

Proposal: Support multipart/form-data in the watchdog #344

johnmccabe opened this issue Oct 26, 2017 · 2 comments
Labels

Comments

@johnmccabe
Copy link
Contributor

Expected Behaviour

I would like to be able to send multipart/form-data to a function and have the parts in that form-data exposed to the function in a json object.

For example:

curl localhost:8080/function/myfn -F "image=@picture.jpg" -F "text=@README.md" -F "somekey=somevalue"

Would result in the following map being passed to the function (expect this to be packaged up with the headers similarly to when marshalRequest is set).

key value encoded filename
image CpLjQJx3/... true picture.jpg
text #README Title... false README.md
somekey somevalue false

Where binary Mime types are base64 encoded prior to marshalling.

Current Behaviour

Its currently not straight forward to pass multiple files to a function, adding the ability to use multipart/form-data with JSON can simplify the process.

Possible Solution

I've a working prototype on a local branch that I'd implemented to allow me to create a demo function for a Meetup today.

Steps to Reproduce (for bugs)

n/a

Context

I want a simple way of passing multiple files to a function, ideally via curl for inclusion in CI pipelines with minimal overhead.

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    17.09.0-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Swarm
  • Operating System and version (e.g. Linux, Windows, MacOS):
    MacOS 10.12.6
  • Link to your project or a code example to reproduce issue:
    Will raise PR
@johnmccabe
Copy link
Contributor Author

Derek add label: proposal

@alexellis
Copy link
Member

/close: inactive

@derek derek bot closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants