Skip to content

Support arbitrary content-type in multipart form parts #725

@jficz

Description

@jficz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions