Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

upload dcm file using curl -x post

Open hubblezzhu opened this issue 9 years ago • 3 comments

hi, i want to upload a .dcm file to orthanc using curl -x post but when i execute this command curl -X POST http://localhost:8042/instances -data-binary test.dcm it replies curl: (6) Could not resolve host: test.dcm can anyone help me with this? any help will be greatly appreciate.

hubblezzhu avatar Mar 09 '17 02:03 hubblezzhu

i change the test.dcm path to absolute path /home/test.dcm and then i get curl: (3) <url> malformed how can i login orthanc with orthanc:orthanc in curl? thanks a lot.

hubblezzhu avatar Mar 09 '17 02:03 hubblezzhu

I think this would be "the hard way" to upload dicom files. Is there any particular reason you are trying to do it this way? If not, I'd recommend one of the following three methods:

  • via DICOM using something like DCMTK's storescu command
  • via HTTP using STOW-RS
  • manually using drag&drop on orthanc's upload page

I can understand if you don't want to use the manual approach, but the first two can be easily incorporated into scripts.

I will leave this issue open in case anyone else wants to look into your approach, but if you are satisfied with the other methods I proposed, then feel free to close it.

radicalrob avatar Mar 14 '17 03:03 radicalrob

Thanks much for your help. i have found the way. using following command and it worked. however i don't understand why it need an "@" curl -X POST http://localhost:8042/instances --data-binary @test.dcm i will close this issue and thanks again.

hubblezzhu avatar Mar 21 '17 05:03 hubblezzhu