REST API returns 404 on PUT to /studies/.../attachments, even with "All" permissions

Hello,

I’m having an issue with the REST API on Orthanc version 1.12.7.

I am trying to upload a PDF to an existing study to create a new DICOM series using the API. My orthanc.json configuration is correct and the user has full permissions.

What works: A POST to /tools/find with a StudyInstanceUID successfully finds the study and returns its short Orthanc ID.

What fails: A PUT request to /studies/{Orthanc_ID}/attachments/{filename} then fails with a 404 Not Found - Accessing an inexistent item error. I have also tried using the StudyInstanceUID directly in the attachments URL, and it fails with the same error.

My Configuration: My orthanc.json has AuthenticationEnabled: true and the user has ‘All’ permissions in RestApiUsers:
“RegisteredUsers”: {
“medico”: “medico”
},
“RestApiUsers”: {
“medico”: [ “All” ]
}

Hello,

What’s the value of {filename} ? Have you defined "UserContentType" configuration ?

This config does not exist. Check the non AI hallucinated configuration file.

Best,

Alain