{"record":{"id":"8c225da270598fa3","repo":"quarkusio/quarkus","slug":"filename-not-found","errorCode":null,"errorMessage":"Filename not found","messagePattern":"Filename not found","errorType":"exception","errorClass":"ErrorDataDecoderException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java","lineNumber":824,"sourceCode":"                // FileUpload\n                currentStatus = MultiPartStatus.FILEUPLOAD;\n                // do not change the buffer position\n                return decodeMultipart(MultiPartStatus.FILEUPLOAD);\n            } else {\n                // Field\n                currentStatus = MultiPartStatus.FIELD;\n                // do not change the buffer position\n                return decodeMultipart(MultiPartStatus.FIELD);\n            }\n        } else {\n            if (filenameAttribute != null) {\n                // FileUpload\n                currentStatus = MultiPartStatus.MIXEDFILEUPLOAD;\n                // do not change the buffer position\n                return decodeMultipart(MultiPartStatus.MIXEDFILEUPLOAD);\n            } else {\n                // Field is not supported in MIXED mode\n                throw new ErrorDataDecoderException(\"Filename not found\");\n            }\n        }\n    }\n\n    private static final String FILENAME_ENCODED = HttpHeaderValues.FILENAME.toString() + '*';\n\n    private Attribute getContentDispositionAttribute(String... values) {\n        String name = cleanString(values[0]);\n        String value = values[1];\n\n        // Filename can be token, quoted or encoded. See https://tools.ietf.org/html/rfc5987\n        if (HttpHeaderValues.FILENAME.contentEquals(name)) {\n            // Value is quoted or token. Strip if quoted:\n            int last = value.length() - 1;\n            if (last > 0 &&\n                    value.charAt(0) == HttpConstants.DOUBLE_QUOTE &&\n                    value.charAt(last) == HttpConstants.DOUBLE_QUOTE) {\n                value = value.substring(1, last);","sourceCodeStart":806,"sourceCodeEnd":842,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java#L806-L842","documentation":"In mixed multipart mode, the decoder found a form field (name attribute) without a filename attribute. Only file uploads are supported inside multipart/mixed sections, so parsing fails with 'Filename not found'. This enforces that every part within a mixed block is a file upload.","triggerScenarios":"Inside a multipart/mixed section, a part's Content-Disposition has a 'name' but no 'filename' parameter, so the MIXEDFILEUPLOAD transition cannot complete.","commonSituations":"Servers embedding plain fields inside multipart/mixed blocks; hand-written multipart serializers mixing fields and files in a mixed section; email-style bodies reused over HTTP.","solutions":["Ensure every part inside multipart/mixed includes a filename parameter in Content-Disposition.","Move plain (non-file) fields out of the mixed section into the outer multipart body.","Fix the server serializer so mixed sections only contain file attachments.","If the payload is legitimate, handle it with a custom parser instead of the built-in decoder."],"exampleFix":"// before (field inside mixed, no filename)\nContent-Disposition: form-data; name=\"note\"\n// after\nContent-Disposition: form-data; name=\"attachment\"; filename=\"note.txt\"","handlingStrategy":"validation","validationCode":"// Ensure every part inside multipart/mixed carries a filename\nmixedParts.forEach(p -> {\n    if (p.filename() == null || p.filename().isBlank()) {\n        throw new IllegalStateException(\"Part '\" + p.name() + \"' in multipart/mixed must have a filename\");\n    }\n});","typeGuard":"static boolean isFilePart(DispositionPart p) {\n    return p != null && p.filename() != null && !p.filename().isBlank();\n}","tryCatchPattern":"try {\n    return decoder.decodeMultipart(MIXEDDELIMITER);\n} catch (ErrorDataDecoderException e) {\n    if (\"Filename not found\".equals(e.getMessage())) {\n        throw new UnsupportedMixedFieldException(\"Plain fields are not allowed inside multipart/mixed\", e);\n    }\n    throw e;\n}","preventionTips":["Only place file uploads inside multipart/mixed sections.","Put plain form fields at the outer multipart/form-data level.","Enforce filename presence in the server serializer API.","Test mixed payloads against the Quarkus client in CI."],"tags":["multipart","filename","mixed-multipart","resteasy-reactive"],"backgroundTag":"multipart-missing-filename","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}