From 20b30d0b1257a153d9867dcce0647d2eaaa5e0b7 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Mon, 25 May 2026 13:22:28 +0200 Subject: [PATCH] feat: declare accepts_mime for the document input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- module.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module.yaml b/module.yaml index f7767b5..e3e9d18 100644 --- a/module.yaml +++ b/module.yaml @@ -29,3 +29,13 @@ outputs: # zip, quick-xml). No filesystem, no network. The empty list makes # this explicit; the hub enforces it. 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