{"record":{"id":"b31c7eee50112b16","repo":"conductor-oss/conductor","slug":"file-has-not-been-uploaded","errorCode":null,"errorMessage":"File has not been uploaded: {}","messagePattern":"File has not been uploaded: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java","lineNumber":154,"sourceCode":"        return response;\n    }\n\n    @Override\n    public void uploadContent(String workflowId, String fileId, InputStream content) {\n        FileModel model = getOwnedFile(workflowId, fileId);\n        if (model.getUploadStatus() != FileUploadStatus.UPLOADING) {\n            throw new ConflictException(\"File is not accepting content uploads: \" + fileId);\n        }\n        fileStorage.writeContent(model.getStoragePath(), content);\n    }\n\n    @Override\n    public FileContent downloadContent(String workflowId, String fileId) {\n        // Family-accessible, like getDownloadUrl: for the Conductor backend that URL is this\n        // endpoint, so requiring the exact owner here would 403 a URL we just handed out.\n        FileModel model = getFamilyAccessibleFile(workflowId, fileId);\n        if (model.getUploadStatus() != FileUploadStatus.UPLOADED) {\n            throw new IllegalArgumentException(\"File has not been uploaded: \" + fileId);\n        }\n        return new FileContent(\n                fileStorage.readContent(model.getStoragePath()),\n                model.getContentType(),\n                model.getStorageContentSize());\n    }\n\n    @Override\n    public FileHandle getFileMetadata(String workflowId, String fileId) {\n        FileModel model = getFamilyAccessibleFile(workflowId, fileId);\n        return FileModelConverter.toFileHandle(model);\n    }\n\n    @Override\n    public MultipartInitResponse initiateMultipartUpload(String workflowId, String fileId) {\n        FileModel model = getOwnedFile(workflowId, fileId);\n        String uploadId = fileStorage.initiateMultipartUpload(model.getStoragePath());\n","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java#L136-L172","documentation":"Thrown by FileStorageServiceImpl.downloadContent when the file's upload status is not UPLOADED. Content cannot be streamed for a file that was never confirmed uploaded. Raised as IllegalArgumentException (HTTP 400). This is the streaming equivalent of error 472.","triggerScenarios":"Calling downloadContent before confirmUpload; upload was started but never confirmed; download attempted on an UPLOADING record.","commonSituations":"Client requesting streamed content mid-upload; skipped the confirm step; prior upload/confirm failed.","solutions":["Confirm the upload (confirmUpload) before calling downloadContent.","Check getFileMetadata uploadStatus first and only download when UPLOADED.","Redo the upload flow if it never completed."],"exampleFix":"// before\nFileContent c = fileStorageService.downloadContent(wfId, fileId); // throws\n\n// after\nfileStorageService.confirmUpload(wfId, fileId);\nFileContent c = fileStorageService.downloadContent(wfId, fileId);","handlingStrategy":"validation","validationCode":"FileHandle meta = fileStorageService.getFileMetadata(wfId, fileId);\nif (meta.getUploadStatus() == FileUploadStatus.UPLOADED) {\n    fileStorageService.downloadContent(wfId, fileId);\n}","typeGuard":null,"tryCatchPattern":"try {\n    FileContent c = fileStorageService.downloadContent(wfId, fileId);\n} catch (IllegalArgumentException e) {\n    // file not uploaded yet\n}","preventionTips":["Confirm upload before streaming content","Check uploadStatus before download"],"tags":["file-storage","download","state","conductor","java"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}