{"record":{"id":"262a765a1ae426d0","repo":"flowable/flowable-engine","slug":"error-while-reading-uploaded-file-e-getmessage","errorCode":null,"errorMessage":"Error while reading uploaded file: ${e.getMessage()}","messagePattern":"Error while reading uploaded file: (.+?)","errorType":"http","errorClass":"FlowableException","httpStatus":500,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserPictureResource.java","lineNumber":124,"sourceCode":"        if (multipartRequest.getFileMap().size() == 0) {\n            throw new FlowableIllegalArgumentException(\"Multipart request with file content is required\");\n        }\n\n        MultipartFile file = multipartRequest.getFileMap().values().iterator().next();\n\n        try {\n            String mimeType = file.getContentType();\n            int size = ((Long) file.getSize()).intValue();\n\n            // Copy file-body in a bytearray as the engine requires this\n            ByteArrayOutputStream bytesOutput = new ByteArrayOutputStream(size);\n            IOUtils.copy(file.getInputStream(), bytesOutput);\n\n            Picture newPicture = new Picture(bytesOutput.toByteArray(), mimeType);\n            identityService.setUserPicture(user.getId(), newPicture);\n\n        } catch (Exception e) {\n            throw new FlowableException(\"Error while reading uploaded file: \" + e.getMessage(), e);\n        }\n    }\n}\n","sourceCodeStart":106,"sourceCodeEnd":128,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserPictureResource.java#L106-L128","documentation":"I/O failure in UserPictureResource.updateUserPicture: reading the uploaded multipart file's InputStream threw an exception while copying the picture bytes; the original exception message is interpolated. Indicates a client upload interruption or stream/IO problem.","triggerScenarios":"Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/identity/UserPictureResource.java:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the uploaded file is complete and readable","Inspect the wrapped cause for the underlying IO error","Retry the upload"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}