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

Support arbitrary content-type in multipart form parts #725

Open
jficz opened this issue Mar 9, 2025 · 0 comments
Open

Support arbitrary content-type in multipart form parts #725

jficz opened this issue Mar 9, 2025 · 0 comments

Comments

@jficz
Copy link

jficz commented Mar 9, 2025

Currently only application/json is supported and assumed in form parts (i.e. "part is parsed as JSON" in the docs).

Being able to support other types, like media or any kind of data type would be great for generic webhooks which send such data (like Matrix-hookshot in my case).

If a non-json content-type is encountered, the data should be saved to a temp/work dir according to their file_name parameter or name parameter if file_name isn't present. The path then can exposed to the webhook handler in the same fashion as other parameters (like env var containing the path or even the raw data).

Similar functionality exists already except that the binary data must first be converted to a json. This means that a webhook containing binary data must either be preprocessed somehow (which effectively means creating another webhook handling service in front of Webhook) or the webhook dispatcher must be configured to do that kind of conversion, which isn't always possible.

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

No branches or pull requests

1 participant