upload dcm file using curl -x post
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.
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.
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.
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.