feat: declare accepts_mime for the document input

Studio reads ModuleInfoResponse.accepts_mime through gRPC
and uses it as the OS file-picker filter. Declaring the
exact MIME list the module accepts (application/pdf,
application/x-pdf, the long DOCX one) prevents the
"unsupported MIME type" rejection the operator used to hit
when picking a PNG by mistake.

Same list the inline comment next to `inputs.document`
already documented — now machine-readable.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-05-25 13:22:28 +02:00
parent 1078367d6a
commit 20b30d0b12

View file

@ -29,3 +29,13 @@ outputs:
# zip, quick-xml). No filesystem, no network. The empty list makes # zip, quick-xml). No filesystem, no network. The empty list makes
# this explicit; the hub enforces it. # this explicit; the hub enforces it.
permissions: [] permissions: []
# MIME-type allow-list for the `document` input. Studio reads this
# through ModuleInfoResponse.accepts_mime and uses it as the OS
# file-picker filter so operators don't accidentally pick a `.png`
# for a PDF-extract step. Same list documented inline next to
# `inputs.document` above; kept synchronised by hand for now.
accepts_mime:
- application/pdf
- application/x-pdf
- application/vnd.openxmlformats-officedocument.wordprocessingml.document