STOW-RS fails while adding Content-type=multipart/related; type=application/dicom; boundary=

Hi
I am trying to do STOW-RS (to upload dcm file) with Orthanc.
Able to upload if content type is “multipart/related; boundary=”

But it fails while changing content-type header as per dicom web standard(http://dicom.nema.org/dicom/2013/output/chtml/part18/sect_6.6.html) as “multipart/related; type=application/dicom; boundary=----someText”.
What else headers need to be set here ?
Error:

T0219 12:27:40.827197 HttpServer.cpp:732] HTTP header: [content-type]: [multipart/related; type=application/dicom; boundary=-------someText]

T0219 12:27:40.827211 HttpServer.cpp:732] HTTP header: [mime-version]: [1.0]

T0219 12:27:40.827221 HttpServer.cpp:732] HTTP header: [content-length]: [132142]

T0219 12:27:40.827231 HttpServer.cpp:732] HTTP header: [connection]: [Keep-Alive]

T0219 12:27:40.827243 HttpServer.cpp:732] HTTP header: [accept-encoding]: [gzip, deflate]

T0219 12:27:40.827255 HttpServer.cpp:732] HTTP header: [accept-language]: [en-IN,*]

T0219 12:27:40.827266 HttpServer.cpp:732] HTTP header: [user-agent]: [Mozilla/5.0]

I0219 12:27:40.827291 HttpServer.cpp:817] POST /instances

I0219 12:27:40.827724 OrthancRestApi.cpp:116] Receiving a DICOM file of 132142 bytes through HTTP

W: DcmItem: Length of element (2d2d,2d2d) is odd

E: DcmElement: Unknown Tag & Data (2d2d,2d2d) larger (757935405) than remaining bytes (132134) in file, premature end of stream

Thanks & Regards,

Rekha Devi

Correcting content-type in working case:
content type is “multipart/form-data; boundary=”

Hello,

You are most likely confusing the URI for DICOMweb with the URI for the custom REST API of Orthanc.

http://localhost:8042/instances” => this is the REST API of Orthanc, which accepts “multipart/form-data” or a plain DICOM file:
https://book.orthanc-server.com/users/rest.html#sending-dicom-images

http://localhost:8042/dicom-web/studies” => this is the DICOMweb API, which only accepts “multipart/related”, as described in your link to the DICOM standard:
https://book.orthanc-server.com/plugins/dicomweb.html

https://www.dicomstandard.org/dicomweb/store-stow-rs/

Sébastien-