Describe Your Question
I’m using OHIF to see dicom images from dcm4chee dicom server, i can see the study list, and the preview of series in viewer page, but i cannot do anything because i got an error about the missing content type from response header, that it’s used on extractMultipart of @cornerstone/dicom-image-loader.
What steps can we follow to reproduce the bug?
- Clone ohif version 3.10.0-beta.121
- Get a dcm4chee server with respond with no content type
- try to view a study
Error
app.bundle.a76722b268a9129984a7.js:38595 TypeError: Cannot read properties of null (reading 'indexOf')
at extractMultipart (app.bundle.a76722b268a9129984a7.js:38442:21)
at app.bundle.a76722b268a9129984a7.js:38578:35
Piece of code with the error
export default function extractMultipart(contentType, imageFrameAsArrayBuffer, options) {
options ||= {};
const response = new Uint8Array(imageFrameAsArrayBuffer);
const isPartial = !!options?.isPartial;
if (contentType.indexOf('multipart') === -1) {
return {
contentType,
imageQualityStatus: isPartial
? ImageQualityStatus.SUBRESOLUTION
: ImageQualityStatus.FULL_RESOLUTION,
pixelData: response,
};
}
...
What should i do to set a config or something to avoid the need of content type ?