conductor-oss/conductor · warning · ConflictException

File is not accepting content uploads

Error message

File is not accepting content uploads: {}

What it means

Thrown by FileStorageServiceImpl.uploadContent when the file's upload status is not UPLOADING. Streaming content is only accepted while the file is in the active upload state; once confirmed (UPLOADED) or otherwise advanced, further content uploads are rejected as ConflictException (HTTP 409).

Solutions

  1. Upload content only while status is UPLOADING (i.e. right after createFile and before confirmUpload).
  2. To replace content, create a new file record rather than reusing a completed one.
  3. Treat 409 here as 'already complete' if the prior upload succeeded.

Example fix

// before - uploading to an already-completed file
fileStorageService.uploadContent(wfId, fileId, in); // throws ConflictException

// after - create a new file to replace content
FileUploadResponse r = fileStorageService.createFile(req);
fileStorageService.uploadContent(wfId, r.getFileId(), in);
Defensive patterns

Strategy: validation

Validate before calling

FileHandle meta = fileStorageService.getFileMetadata(wfId, fileId);
boolean canUpload = meta.getUploadStatus() == FileUploadStatus.UPLOADING;

Try / catch

try {
    fileStorageService.uploadContent(wfId, fileId, in);
} catch (ConflictException e) {
    // not in UPLOADING state; create a new file to replace content
}

Prevention

When it happens

Trigger: Calling uploadContent after confirmUpload already marked the file UPLOADED; attempting to overwrite content of an already-completed file; the record was advanced out of UPLOADING by another path.

Common situations: Client retrying uploadContent after a confirm succeeded; duplicate upload attempts; overwrite attempt on an immutable completed file.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/c9e587f27419543c. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/conductoross/conductor/core/storage/FileStorageServiceImpl.java:143

                    "File not yet uploaded: " + fileId + ", status=" + model.getUploadStatus());
        }
        String downloadUrl =
                fileStorage.generateDownloadUrl(
                        model.getStoragePath(), properties.getSignedUrlExpiration());
        long expiresAt = Instant.now().plus(properties.getSignedUrlExpiration()).toEpochMilli();

        FileDownloadUrlResponse response = new FileDownloadUrlResponse();
        response.setFileHandleId(FileIdToFileHandleIdConverter.toFileHandleId(fileId));
        response.setDownloadUrl(downloadUrl);
        response.setExpiresAt(expiresAt);
        return response;
    }

    @Override
    public void uploadContent(String workflowId, String fileId, InputStream content) {
        FileModel model = getOwnedFile(workflowId, fileId);
        if (model.getUploadStatus() != FileUploadStatus.UPLOADING) {
            throw new ConflictException("File is not accepting content uploads: " + fileId);
        }
        fileStorage.writeContent(model.getStoragePath(), content);
    }

    @Override
    public FileContent downloadContent(String workflowId, String fileId) {
        // Family-accessible, like getDownloadUrl: for the Conductor backend that URL is this
        // endpoint, so requiring the exact owner here would 403 a URL we just handed out.
        FileModel model = getFamilyAccessibleFile(workflowId, fileId);
        if (model.getUploadStatus() != FileUploadStatus.UPLOADED) {
            throw new IllegalArgumentException("File has not been uploaded: " + fileId);
        }
        return new FileContent(
                fileStorage.readContent(model.getStoragePath()),
                model.getContentType(),
                model.getStorageContentSize());
    }

View on GitHub (pinned to cf7c3e4a8a)